/* Variables */
:root {
  --bg: var(--pntd-bg-deep);
  --text: #ffffff;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--pntd-font);
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
  position: relative;
}

/* ─── Background ──────────────────────────────────────────────────────────── */
.pntd-prism {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none; overflow: hidden; will-change: transform;
}
.pntd-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.15; will-change: transform;
}
.pntd-orb.red    { width:45vmax;height:45vmax;background:#ff0055;top:50%;left:50%;margin:-22.5vmax 0 0 -22.5vmax; }
.pntd-orb.cyan   { width:40vmax;height:40vmax;background:#00ccff;top:50%;left:50%;margin:-20vmax 0 0 -20vmax; }
.pntd-orb.purple { width:35vmax;height:35vmax;background:#8800ff;top:50%;left:50%;margin:-17.5vmax 0 0 -17.5vmax; }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.event-header {
  position: fixed; top:0; left:0; right:0;
  padding: 30px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 20; pointer-events: none;
}
.header-left { flex:1; pointer-events:auto; }
.header-right { flex:1; display:flex; justify-content:flex-end; align-items:center; pointer-events:auto; }

.meta-status {
  font-family: monospace; font-size: 0.7rem; color: #fff;
  background: var(--pntd-glass-bg);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--pntd-glass-border);
  padding: 8px 16px; border-radius: 50px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.live-dot {
  width:6px; height:6px; background:#00ff00;
  border-radius:50%; box-shadow:0 0 8px #00ff00;
}

/* ─── Deck ────────────────────────────────────────────────────────────────── */
main {
  position: relative; z-index: 5; flex: 1;
  width: 100vw; display: flex; align-items: center;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 0 20px; cursor: grab;
  scrollbar-width: none; scroll-behavior: smooth;
}
main::-webkit-scrollbar { display: none; }
main.is-dragging { cursor: grabbing; scroll-snap-type: none; }
main.is-dragging .enter-btn,
main.is-dragging .social-link { pointer-events: none; }

.spacer { min-width: 50vw; flex-shrink: 0; }
@media (max-width: 600px) { .spacer { min-width: 10vw; } }

/* ─── Portal card ─────────────────────────────────────────────────────────── */
.portal {
  scroll-snap-align: center; flex-shrink: 0;
  width: 85vw; max-width: 400px;
  height: 65vh; max-height: 600px;
  margin: 0 20px; perspective: 1500px;
  position: relative; cursor: default;
  transition: transform 0.4s var(--ease);
}
.portal:hover { transform: translateY(-5px); }

.pntd-glass {
  width: 100%; height: 100%;
  background-color: var(--pntd-glass-bg);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  border: 1px solid var(--pntd-glass-border);
  border-radius: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px; position: relative; overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.05);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.pntd-glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.35) 100%);
}

.info-slab {
  background: rgba(5,5,5,0.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--pntd-glass-border);
  border-radius: 16px; padding: 20px;
  position: relative; z-index: 5;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.portal:hover .info-slab { transform: scale(1.02); }

h2 {
  font-size: 1.6rem; line-height: 1.1;
  margin: 0 0 12px 0; font-weight: 800; letter-spacing: -0.5px;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.details {
  font-family: monospace; font-size: 0.75rem;
  color: #ddd; line-height: 1.6; font-weight: 500; letter-spacing: 0.5px;
}
.details i { width:25px; text-align:center; margin-right:5px; color:var(--tint); filter:drop-shadow(0 0 5px var(--tint)); }

.top-content { margin-top: 0; }
.bottom-content { margin-bottom: 25px; }

.swipe-reactor {
  position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 80px;
  background: radial-gradient(circle at 50% 0%, var(--tint) 0%, transparent 70%);
  border-radius: 50% 50% 0 0; opacity: 0; pointer-events: none;
  z-index: 3; transition: opacity 0.3s; filter: blur(20px);
}
.portal[data-status="active"] .swipe-reactor,
.portal[data-status="upcoming"] .swipe-reactor {
  opacity: 0.5; bottom: -40px;
  animation: reactorPulse 4s infinite ease-in-out;
}
@keyframes reactorPulse {
  0%,100% { opacity:.3; transform:translateX(-50%) scale(1); }
  50%     { opacity:.6; transform:translateX(-50%) scale(1.2); }
}

.satellite-row {
  display: flex; gap: 15px; margin-bottom: 15px; padding-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1); justify-content: center;
}
.social-link {
  color: rgba(255,255,255,0.6); font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.social-link:hover { color: var(--tint); transform: scale(1.2); text-shadow: 0 0 10px var(--tint); }

.enter-btn {
  display: block; width: 100%; padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff; text-align: center;
  font-family: monospace; font-weight: 700;
  letter-spacing: 2px; font-size: 0.8rem;
  border-radius: 10px; cursor: pointer;
  transition: all 0.3s ease; text-transform: uppercase;
  touch-action: manipulation;
}
.enter-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--tint); box-shadow: 0 0 15px rgba(255,255,255,0.1); }
.enter-btn:active { transform: scale(0.98); }

/* Status variants */
.portal[data-status="upcoming"] .enter-btn {
  background: rgba(0,0,0,0.5); border: 1px solid var(--tint); color: var(--tint);
}
.portal[data-status="upcoming"] .enter-btn:hover {
  background: var(--tint); color: #000; box-shadow: 0 0 20px var(--tint);
}
.portal[data-status="planned"] { opacity: 0.8; }
.portal[data-status="planned"] .enter-btn { opacity:.5; cursor:not-allowed; pointer-events:none; border-style:dashed; }
.portal[data-status="archived"] { opacity: 0.6; filter: grayscale(0.9); }
.portal[data-status="archived"]:hover { opacity: 0.9; filter: grayscale(0.4); }

@keyframes glassPulse {
  0%,100% { box-shadow:0 0 20px rgba(0,0,0,.5),inset 0 0 0px var(--tint); border-color:rgba(255,255,255,.2); }
  50%     { box-shadow:0 0 30px rgba(0,0,0,.6),inset 0 0 10px var(--tint); border-color:var(--tint); }
}

.portal-status-label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px;
  opacity: 0.6; text-align: center; margin-bottom: 10px;
}

/* ─── Loader / utils ──────────────────────────────────────────────────────── */
.loader {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: rgba(255,255,255,0.5); letter-spacing: 4px;
  font-family: monospace; font-size: 0.8rem;
  animation: pulse 2s infinite alternate;
}
@keyframes pulse { from{opacity:.4} to{opacity:1} }

.pntd-swipe-hint {
  position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; opacity: 0.6; animation: fadeOutHint 5s forwards; animation-delay: 4s;
}
.swipe-icon { display:flex; gap:10px; font-size:1.2rem; color:#fff; animation:swipeAnim 2s infinite; }
.pntd-swipe-hint span { font-family:monospace; font-size:0.6rem; letter-spacing:2px; color:#aaa; }
@keyframes swipeAnim { 0%,100%{transform:translateX(0)} 50%{transform:translateX(10px)} }
@keyframes fadeOutHint { to{opacity:0;visibility:hidden} }


/* ═══════════════════════════════════════════════════════════════════════════
   EVENT OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

#event-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end;
  opacity: 0; transition: opacity 0.3s ease;
}
#event-overlay.open { opacity: 1; }

.evo-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.evo-panel {
  position: relative; z-index: 1;
  width: 100%; max-height: 92dvh;
  background: #080808;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px 28px 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(48px);
  transition: transform 0.4s cubic-bezier(0.34,1.4,0.64,1);
  box-shadow: 0 -20px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
#event-overlay.open .evo-panel { transform: translateY(0); }

/* Accent glow strip at top of panel */
.evo-panel::before {
  content: "";
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--tint, #00d9bf), transparent);
  opacity: 0.6;
}

@media (min-width: 768px) {
  #event-overlay { align-items: center; justify-content: center; }
  .evo-panel {
    width: min(94vw, 1200px); max-height: 84dvh;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    transform: translateY(24px) scale(0.96);
  }
  #event-overlay.open .evo-panel { transform: translateY(0) scale(1); }
}

/* Header */
.evo-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.evo-header__left { flex: 1; min-width: 0; }
.evo-header__right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.evo-header__name {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.evo-header__meta {
  display: flex; gap: 14px; margin-top: 5px;
  font-family: monospace; font-size: 0.62rem;
  color: rgba(255,255,255,0.38); letter-spacing: 0.5px; flex-wrap: wrap;
}
.evo-header__meta i { color: var(--tint); margin-right: 4px; }

.evo-count {
  text-align: center; line-height: 1;
}
.evo-count__num {
  display: block; font-family: monospace; font-size: 1.5rem; font-weight: 800;
  color: var(--tint); letter-spacing: -1px;
}
.evo-count__label {
  display: block; font-family: monospace; font-size: 0.48rem;
  letter-spacing: 2.5px; color: rgba(255,255,255,0.3); margin-top: 3px;
}

.evo-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: all 0.2s ease;
  touch-action: manipulation;
}
.evo-close:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); }

/* Grid */
.evo-grid {
  flex: 1; overflow-y: auto; padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: 140px;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
@media (min-width: 480px) {
  .evo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-auto-rows: 160px; gap: 12px; }
}
@media (min-width: 900px) {
  .evo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 200px; gap: 14px; }
}

.evo-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  padding: 80px 20px;
  font-family: monospace; font-size: 0.65rem;
  letter-spacing: 3px; color: rgba(255,255,255,0.2);
}
.evo-empty i { font-size: 2rem; opacity: 0.3; }

/* Thumb */
.evo-thumb {
  position: relative; border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; touch-action: manipulation;
  transition: transform 0.22s var(--ease), border-color 0.22s ease, box-shadow 0.22s ease;
}
.evo-thumb:hover {
  transform: scale(1.04) translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 2;
}
.evo-thumb:active { transform: scale(0.97); }

.evo-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s var(--ease);
}
.evo-thumb:hover img { transform: scale(1.06); }

/* Hover overlay */
.evo-thumb__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px;
  opacity: 0; transition: opacity 0.22s ease;
}
.evo-thumb:hover .evo-thumb__overlay { opacity: 1; }

.evo-thumb__title {
  font-size: 0.68rem; font-weight: 700; color: #fff;
  letter-spacing: 0.3px; line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin-bottom: 6px;
}
.evo-thumb__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.evo-thumb__id {
  font-family: monospace; font-size: 0.5rem;
  color: rgba(255,255,255,0.35); letter-spacing: 0.5px;
}
.evo-thumb__badge {
  font-family: monospace; font-size: 0.45rem; letter-spacing: 1.5px;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(0,217,191,0.18); border: 1px solid rgba(0,217,191,0.4);
  color: #00d9bf; text-transform: uppercase; white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════════════════
   EVENT LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════════ */

#event-lightbox {
  position: fixed; inset: 0; z-index: 300;
  opacity: 0; transition: opacity 0.25s ease;
  /* palette glow vars — overridden by JS */
  --pal-0: #111; --pal-1: #111; --pal-2: #111;
}
#event-lightbox.open { opacity: 1; }

.elb-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

/* Ambient palette glow behind the image */
#event-lightbox::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, var(--pal-0), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 60%, var(--pal-1), transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 50%, var(--pal-2), transparent 70%);
  opacity: 0.18;
  transition: background 0.6s ease;
}

.elb-stage {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 20px;
}

.elb-frame {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: min(90vw, 820px);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
#event-lightbox.open .elb-frame { transform: scale(1); }

.elb-close {
  position: absolute; top: -14px; right: -14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10,10,10,0.9);
  color: rgba(255,255,255,0.8); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; z-index: 2;
  transition: all 0.2s ease; touch-action: manipulation;
}
.elb-close:hover { background: #1a1a1a; color: #fff; border-color: rgba(255,255,255,0.35); }

.elb-img-wrap {
  position: relative; border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.08);
  background: #0d0d0d;
  max-height: 72dvh;
  display: flex; align-items: center; justify-content: center;
}

.elb-img {
  display: block; max-width: min(88vw, 820px); max-height: 72dvh;
  object-fit: contain; border-radius: 18px;
  opacity: 0; transition: opacity 0.3s ease;
}
.elb-img.loaded { opacity: 1; }

.elb-shimmer {
  position: absolute; inset: 0; border-radius: 18px;
  background: linear-gradient(135deg, #111 25%, #1a1a1a 50%, #111 75%);
  background-size: 200% 200%;
  animation: shimmerAnim 1.4s infinite;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
@keyframes shimmerAnim {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.elb-info {
  width: 100%; text-align: center; padding: 0 4px;
}
.elb-title {
  font-size: 1.05rem; font-weight: 700; color: #fff;
  margin-bottom: 8px; letter-spacing: 0.2px;
  line-height: 1.3;
}
.elb-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.elb-id {
  font-family: monospace; font-size: 0.52rem;
  color: rgba(255,255,255,0.2); letter-spacing: 1px;
}
.elb-avail, .elb-price {
  font-family: monospace; font-size: 0.55rem; letter-spacing: 1.5px;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase;
}
.elb-avail {
  background: rgba(0,217,191,0.12);
  border: 1px solid rgba(0,217,191,0.35); color: #00d9bf;
}
.elb-price {
  background: rgba(232,207,0,0.1);
  border: 1px solid rgba(232,207,0,0.3); color: #e8cf00;
}

/* Prev / Next */
.elb-nav {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
  transition: all 0.2s ease; touch-action: manipulation;
}
.elb-nav:hover { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.3); }
.elb-nav:active { transform: scale(0.9); }

@media (max-width: 600px) {
  .elb-nav { display: none; }
}

/* Counter */
.elb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-family: monospace; font-size: 0.6rem; letter-spacing: 2px;
  color: rgba(255,255,255,0.3); z-index: 2; pointer-events: none;
}
