.world-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.65rem;
  min-height: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255,255,255,0.06);
  background: #0b0b0b;
  transition: transform 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.world-card:hover {
  transform: translateY(-2px) scale(1.015);
  border-color: rgba(197,160,89,0.35);
  box-shadow: 0 25px 70px rgba(0,0,0,0.45), 0 0 0 1px rgba(197,160,89,0.12) inset;
}

.world-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.00) 0%,
    rgba(0,0,0,0.02) 50%,
    rgba(0,0,0,0.28) 100%
  );
  pointer-events: none;
}

.world-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transition: transform 0.6s ease;
}

.world-card:hover .world-card-image {
  transform: scale(1.04);
}

.world-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
}

.detail-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: #0b0b0b;
  box-shadow: 0 35px 120px rgba(0,0,0,0.55);
}

.thumb-btn.active {
  border-color: rgba(197,160,89,0.65);
  box-shadow: 0 0 0 1px rgba(197,160,89,0.2) inset, 0 0 24px rgba(197,160,89,0.18);
  transform: translateY(-1px);
}

.lightbox {
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lb-stage {
  position: relative;
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lb-image-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  max-height: 86vh;
  height: auto;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

.lb-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1rem;
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  image-rendering: auto;
  backface-visibility: hidden;
}

.lb-image-shell:not(.zoomed) .lb-img {
  cursor: zoom-in;
}

.lb-image-shell.zoomed {
  cursor: grab;
}

.lb-image-shell.zoomed .lb-img {
  cursor: grab;
}

.lb-image-shell.zoomed.dragging {
  cursor: grabbing;
}

.lb-image-shell.zoomed.dragging .lb-img {
  cursor: grabbing;
  transition: none;
}

.detail-stack {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  .detail-stack {
    gap: 1.5rem;
  }
}

.portfolio-hero-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 22%, rgba(197, 160, 89, 0.10), transparent 26%),
    radial-gradient(circle at 78% 72%, rgba(197, 160, 89, 0.18), transparent 28%),
    linear-gradient(
      90deg,
      rgba(197, 160, 89, 0.07) 0%,
      rgba(197, 160, 89, 0.02) 10%,
      rgba(197, 160, 89, 0) 22%,
      rgba(197, 160, 89, 0) 78%,
      rgba(197, 160, 89, 0.02) 90%,
      rgba(197, 160, 89, 0.07) 100%
    ),
    linear-gradient(180deg, #020202 0%, #050505 52%, #030303 100%);
}

.portfolio-hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 56%, rgba(197, 160, 89, 0.14), transparent 22%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.015) 0%,
      rgba(255, 255, 255, 0) 18%
    );
  z-index: 0;
}

.hero-signal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.95;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-signal-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(197, 160, 89, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197, 160, 89, 0.05) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(circle at 58% 48%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.72) 40%, rgba(0,0,0,0) 86%);
  -webkit-mask-image: radial-gradient(circle at 58% 48%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.72) 40%, rgba(0,0,0,0) 86%);
}

.worlds-shell {
  position: relative;
  overflow: hidden;
}

#heroSignalCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.worlds-shell > *:not(#heroSignalCanvas) {
  position: relative;
  z-index: 1;
}

#lbPrev,
#lbNext,
#lbClose {
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#lbPrev,
#lbNext {
  background: rgba(10,10,10,0.72);
  border-color: rgba(197,160,89,0.26);
  color: rgba(255,255,255,0.92);
}

#lbPrev:hover,
#lbNext:hover {
  background: rgba(18,18,18,0.88);
  border-color: rgba(197,160,89,0.45);
}

#selectionGrid {
  align-items: stretch;
}
#backToWorlds {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 58px;
  padding: 1rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(197,160,89,0.5);
  background:
    linear-gradient(180deg, rgba(197,160,89,0.24) 0%, rgba(197,160,89,0.12) 100%),
    rgba(10,10,10,0.88);
  color: #f3dfb0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    0 16px 40px rgba(0,0,0,0.36),
    0 0 0 1px rgba(197,160,89,0.14) inset,
    0 0 30px rgba(197,160,89,0.14);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

#backToWorlds:hover,
#backToWorlds:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(197,160,89,0.78);
  background:
    linear-gradient(180deg, rgba(197,160,89,0.32) 0%, rgba(197,160,89,0.16) 100%),
    rgba(12,12,12,0.94);
  box-shadow:
    0 20px 48px rgba(0,0,0,0.44),
    0 0 0 1px rgba(197,160,89,0.2) inset,
    0 0 42px rgba(197,160,89,0.20);
}

#backToWorlds::before {
  content: "←";
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 767px) {
  #backToWorlds {
    width: 100%;
    min-height: 62px;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    letter-spacing: 0.14em;
  }

  .lb-stage {
    max-width: 100vw;
    max-height: 100vh;
  }

  .lb-image-shell {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    overflow: hidden;
  }

  .lb-img {
    max-width: 100vw;
    max-height: 94vh;
    width: auto;
    height: auto;
    border-radius: 0;
    filter: contrast(1.02) saturate(1.02);
  }
}