/* ═══════════════════════════════════════════════════════════════
   NEXETH — Shell Base (Artwork + Lore Detail Pages)
   Nur UI-Chrome: Loader, Cursor, Progress, Preview-Banner.
   Keine Typografie/Layout für Content — das kommt ausschließlich aus dem Theme.
   Alles unter .nx-shell wird vom Theme gesteuert.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

/* auto: vermeidet Konflikt mit Lenis (index-ähnliches Smooth-Scrolling) */
html {
  overflow-x: hidden;
  scroll-behavior: auto;
}

/* Minimal: kein globaler body-Font, damit Theme-Fonts greifen */
body.nx-detail-page {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nx-detail-page a {
  color: inherit;
  text-decoration: none;
}

body.nx-detail-page img {
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Shell-Chrome (liegt außerhalb .nx-shell, kollidiert nicht mit Theme) */
#nx-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#nx-loader.fade {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nx-l-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.nx-l-logo {
  font-size: 0.55rem;
  letter-spacing: 0.7em;
  text-transform: uppercase;
  color: rgba(255, 107, 0, 0.35);
}

.nx-l-bar {
  width: 90px;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.nx-l-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--o, #ff6b00);
  transform: translateX(-100%);
  animation: nxlb 1.3s ease infinite;
}

@keyframes nxlb {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#cur {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99998;
  pointer-events: none;
  will-change: transform;
  font-family: var(--f);
}

/* Maus = obere rechte Ecke; Feld wächst nach unten links; Text zentriert */
.c-box {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-100%, 0);
}

.c-label-wrap {
  position: relative;
  width: 11px;
  min-height: 11px;
  transform-origin: top right;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: scale(1) translate(0, 0);
  transition: width 0.48s cubic-bezier(0.16, 1, 0.3, 1),
    min-height 0.48s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.48s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s,
    border-color 0.3s,
    box-shadow 0.35s,
    opacity 0.2s;
}

.c-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: var(--o, #ff6b00);
  z-index: 2;
  pointer-events: none;
  animation: hb-dot 3.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.c-t {
  position: relative;
  z-index: 1;
  font-family: var(--f);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--o, #ff6b00);
  white-space: nowrap;
  text-align: center;
  width: 100%;
  opacity: 0;
  max-width: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: opacity 0.3s 0.06s,
    max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.c-box.h .c-label-wrap {
  width: 100px;
  min-height: 30px;
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid var(--o, #ff6b00);
  border-radius: 1px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  animation: c-field-in 0.56s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.c-box.h .c-t {
  opacity: 1;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
}

.c-box.h .c-dot {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .c-box.h .c-label-wrap {
    animation: none;
    width: 100px;
    min-height: 30px;
  }
}

@keyframes hb-dot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
    background: rgba(255, 107, 0, 0.75);
  }
}

@keyframes c-field-in {
  0% {
    width: 11px;
    min-height: 11px;
    transform: scale(0.52) translate(14px, -12px);
    opacity: 0.92;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  100% {
    width: 100px;
    min-height: 30px;
    transform: scale(1) translate(0, 0);
    opacity: 1;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  }
}

#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--o, #ff6b00);
  z-index: 8000;
  pointer-events: none;
  /* kein width-transition: Lenis-Scroll sonst Jank wie auf Shop-Hub */
}

#nx-preview-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255, 107, 0, 0.93);
  color: #111;
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-align: center;
  padding: 7px;
  font-weight: 700;
  pointer-events: none;
}

#nx-preview-banner.on { display: block; }

/* Lore-Seite: alternativer Loader (Punkt) */
.nx-loader-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--o, #ff6b00);
  animation: nx-pulse 1.4s ease-in-out infinite;
}

@keyframes nx-pulse {
  0%, 100% { transform: scale(0.5); opacity: 0.3; }
  50% { transform: scale(1.5); opacity: 1; }
}

/* Theme-Scope: Content-Root */
.nx-shell.nx-theme-scope {
  min-height: 100vh;
  position: relative;
}

:focus-visible {
  outline: 2px solid var(--o, #ff6b00);
  outline-offset: 2px;
  border-radius: 2px;
}
