/* ══════════════════════════════════════════════════════════
   PORTAVOX — Nav Dock + Portal Transition
   Ersetzt sidebar-left nav-section + center-tabs
══════════════════════════════════════════════════════════ */

/* Center-Bereich bekommt unten Platz für den Dock */
.center {
  padding-bottom: 96px;
}

/* ── Bottom glow line ── */
.dock-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(74,24,56,0.7) 20%,
    rgba(109,40,217,0.45) 50%,
    rgba(74,24,56,0.7) 80%,
    transparent 100%);
  z-index: 150;
  pointer-events: none;
}

/* ── Dock wrapper ── */
.nav-dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 140;
  padding-bottom: 20px;
  pointer-events: none;
}

/* ── Floating card container ── */
.dock-cards {
  position: absolute;
  bottom: 88px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

/* ── Individual card ── */
.dock-card {
  width: 72px;
  height: 88px;
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) scale(0.88);
  transition:
    opacity    0.36s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform  0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
}

/* Stagger open */
.dock-card:nth-child(1)  { transition-delay: 0.00s; }
.dock-card:nth-child(2)  { transition-delay: 0.04s; }
.dock-card:nth-child(3)  { transition-delay: 0.08s; }
.dock-card:nth-child(4)  { transition-delay: 0.12s; }
.dock-card:nth-child(5)  { transition-delay: 0.16s; }
.dock-card:nth-child(6)  { transition-delay: 0.20s; }
.dock-card:nth-child(7)  { transition-delay: 0.24s; }
.dock-card:nth-child(8)  { transition-delay: 0.28s; }
.dock-card:nth-child(9)  { transition-delay: 0.32s; }

/* Stagger close — reverse */
.nav-closing .dock-card:nth-child(1)  { transition-delay: 0.28s; }
.nav-closing .dock-card:nth-child(2)  { transition-delay: 0.24s; }
.nav-closing .dock-card:nth-child(3)  { transition-delay: 0.20s; }
.nav-closing .dock-card:nth-child(4)  { transition-delay: 0.16s; }
.nav-closing .dock-card:nth-child(5)  { transition-delay: 0.12s; }
.nav-closing .dock-card:nth-child(6)  { transition-delay: 0.08s; }
.nav-closing .dock-card:nth-child(7)  { transition-delay: 0.04s; }
.nav-closing .dock-card:nth-child(8)  { transition-delay: 0.00s; }
.nav-closing .dock-card:nth-child(9)  { transition-delay: 0.00s; }

.nav-open .dock-card {
  opacity: 1;
  transform: none;
  pointer-events: all;
}

/* Card surface */
.dock-card-inner {
  width: 100%; height: 100%;
  background: linear-gradient(155deg, rgba(28,16,6,0.97), rgba(14,8,3,0.99));
  border: 1px solid var(--border);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px 10px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 28px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.025);
  transition:
    border-color 0.18s,
    box-shadow   0.18s,
    background   0.18s;
  will-change: transform;
}

/* Top shimmer */
.dock-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 18%; right: 18%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,134,10,0.12), transparent);
}

/* Active amber underline */
.dock-card-inner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16%; right: 16%; height: 2px;
  background: var(--chaos);
  border-radius: 1px 1px 0 0;
  opacity: 0;
  transition: opacity 0.18s;
}

.dock-card:hover .dock-card-inner {
  border-color: rgba(200,134,10,0.3);
  background: linear-gradient(155deg, rgba(40,22,8,0.98), rgba(22,12,4,0.99));
  box-shadow:
    0 0 14px rgba(200,134,10,0.1),
    0 12px 36px rgba(0,0,0,0.8);
}

.dock-card.active .dock-card-inner {
  border-color: var(--chaos);
  background: linear-gradient(155deg, rgba(46,24,8,0.98), rgba(24,13,4,0.99));
  box-shadow:
    0 0 22px rgba(200,134,10,0.2),
    0 0 48px rgba(200,134,10,0.07),
    0 12px 36px rgba(0,0,0,0.8);
}

.dock-card.active .dock-card-inner::after {
  opacity: 1;
}

/* Card icon */
.dock-card-icon {
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.18s, transform 0.18s, filter 0.18s;
}

.dock-card-icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-card:hover .dock-card-icon,
.dock-card.active .dock-card-icon {
  color: var(--chaos);
  transform: scale(1.1) translateY(-1px);
  filter: drop-shadow(0 0 5px rgba(200,134,10,0.5));
}

/* Card label */
.dock-card-label {
  font-family: var(--font-lore);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  transition: color 0.18s;
}

.dock-card:hover .dock-card-label,
.dock-card.active .dock-card-label {
  color: var(--chaos);
}

/* ── Circular trigger button ── */
.dock-trigger {
  position: relative;
  z-index: 10;
  cursor: pointer;
  pointer-events: all;
  user-select: none;
}

.dock-trigger-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(74,24,56,0.92), rgba(14,6,10,0.98));
  border: 1.5px solid rgba(109,40,217,0.28);
  box-shadow:
    0 0 18px rgba(109,40,217,0.15),
    0 0 40px rgba(109,40,217,0.05),
    inset 0 1px 0 rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  position: relative;
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Outer spinning arc */
.dock-trigger-ring::before {
  content: '';
  position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(109,40,217,0.38);
  border-right-color: rgba(200,134,10,0.1);
  animation: dock-spin 9s linear infinite;
  pointer-events: none;
}
.dock-trigger-ring::after {
  content: '';
  position: absolute; inset: -9px; border-radius: 50%;
  border: 1px solid transparent;
  border-bottom-color: rgba(109,40,217,0.18);
  border-left-color: rgba(200,134,10,0.07);
  animation: dock-spin 15s linear infinite reverse;
  pointer-events: none;
}

@keyframes dock-spin { to { transform: rotate(360deg); } }

.nav-open .dock-trigger-ring {
  border-color: rgba(200,134,10,0.55);
  box-shadow:
    0 0 24px rgba(200,134,10,0.28),
    0 0 50px rgba(200,134,10,0.09),
    inset 0 1px 0 rgba(255,255,255,0.05);
  background: radial-gradient(circle at 38% 32%, rgba(76,34,8,0.94), rgba(22,10,4,0.99));
}

.dock-trigger-sigil {
  color: var(--sub);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.32s ease;
}
.dock-trigger-sigil svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
}

.nav-open .dock-trigger-sigil {
  color: var(--chaos);
  filter: drop-shadow(0 0 5px rgba(200,134,10,0.5));
  transform: rotate(45deg);
}

.dock-trigger-lbl {
  font-family: var(--font-ui);
  font-size: 0.36rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  transition: color 0.28s;
}

.nav-open .dock-trigger-lbl { color: var(--chaos); }

/* ── Click-away overlay ── */
.dock-overlay {
  position: fixed; inset: 0;
  z-index: 130;
  pointer-events: none;
}
.nav-open ~ .dock-overlay {
  pointer-events: all;
}

/* ══════════════════════════════════════
   PORTAL TRANSITION OVERLAY
══════════════════════════════════════ */
.rift-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}

.rift-void {
  position: absolute; inset: 0;
  background: #030201;
}

.rift-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.011) 3px,
    rgba(255,255,255,0.011) 4px
  );
  opacity: 0;
}

.rift-edge {
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(74,24,56,0.5)  15%,
    rgba(109,40,217,0.9) 35%,
    rgba(200,134,10,1)   50%,
    rgba(109,40,217,0.9) 65%,
    rgba(74,24,56,0.5)  85%,
    transparent 100%);
  box-shadow:
    0 0 6px  rgba(200,134,10,0.8),
    0 0 18px rgba(200,134,10,0.5),
    0 0 40px rgba(200,134,10,0.3),
    0 0 80px rgba(109,40,217,0.2);
}

.rift-trail {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(109,40,217,0.5) 40%,
    rgba(200,134,10,0.4) 50%,
    rgba(109,40,217,0.5) 60%,
    transparent);
  box-shadow: 0 0 12px rgba(109,40,217,0.4), 0 0 28px rgba(109,40,217,0.2);
  opacity: 0;
  transition: opacity 0.12s;
}

.rift-streaks {
  position: absolute; inset: 0; overflow: hidden;
}

.rift-streak {
  position: absolute; top: 0; bottom: 0; width: 1px; opacity: 0;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(109,40,217,0.4) 40%,
    rgba(200,134,10,0.6) 50%,
    rgba(109,40,217,0.4) 60%,
    transparent 100%);
}

/* Tab content emerge after transition */
@keyframes tab-emerge {
  from {
    opacity: 0;
    filter: brightness(1.8) saturate(0);
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.tab-emerging {
  animation: tab-emerge 0.38s ease forwards;
}
