/* Wormhole Time Navigator */
.wormhole-container {
  position: fixed;
  right: 1.5rem;
  top: 100px;
  z-index: 50;
  transition: opacity 0.3s ease;
}

/* Mini Wormhole Widget */
.mini-wormhole {
  width: 135px;
  height: 135px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.mini-wormhole:hover {
  transform: scale(1.05);
  border-color: rgba(232, 74, 138, 0.4);
  box-shadow: 0 0 30px rgba(232, 74, 138, 0.3);
}
.mini-wormhole.hidden { opacity: 0; pointer-events: none; }

.mini-ring {
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.mini-ring-year { width: 123px; height: 123px; border: 1.5px solid rgba(232, 74, 138, 0.3); }
.mini-ring-month { width: 87px; height: 87px; border: 1.5px solid rgba(255, 140, 66, 0.3); }
.mini-ring-day { width: 51px; height: 51px; border: 1.5px solid rgba(0, 212, 229, 0.3); }

.mini-ind-container {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.mini-ind-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}
.mini-ind-year .mini-ind-dot { width: 10px; height: 10px; top: -61.5px; margin-top: -5px; background: #E84A8A; box-shadow: 0 0 8px rgba(232, 74, 138, 0.9); }
.mini-ind-month .mini-ind-dot { width: 8px; height: 8px; top: -43.5px; margin-top: -4px; background: #FF8C42; box-shadow: 0 0 6px rgba(255, 140, 66, 0.9); }
.mini-ind-day .mini-ind-dot { width: 7px; height: 7px; top: -25.5px; margin-top: -3px; background: #00D4E5; box-shadow: 0 0 5px rgba(0, 212, 229, 0.9); }

.mini-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.mini-center .month {
  font-family: 'Sono', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-center .year {
  font-family: 'Trispace', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Modal Overlay */
.wormhole-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}
.wormhole-modal.visible { opacity: 1; visibility: visible; }
.wormhole-modal.fading-out { opacity: 0; transition: opacity 1s ease; }

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

.modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.wormhole-modal.visible .modal-content { transform: scale(1); }

/* Portal Rings */
.portal-container { position: relative; width: 480px; height: 480px; }
.portal-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.portal-ring-year { width: 460px; height: 460px; border-color: rgba(232, 74, 138, 0.2); }
.portal-ring-month { width: 340px; height: 340px; border-color: rgba(255, 140, 66, 0.2); }
.portal-ring-day { width: 220px; height: 220px; border-color: rgba(0, 212, 229, 0.2); }

/* Tendrils */
.portal-tendril {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(74, 229, 74, 0.5), transparent);
  animation: tendril-spin 20s linear infinite;
  pointer-events: none;
}
@keyframes tendril-spin { to { transform: rotate(360deg); } }

/* Portal Indicators */
.portal-ind-container {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.portal-ind-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}
.portal-ind-year .portal-ind-dot { width: 14px; height: 14px; top: -230px; margin-top: -7px; background: linear-gradient(135deg, #E84A8A, #F472B6); box-shadow: 0 0 15px rgba(232, 74, 138, 0.8); }
.portal-ind-month .portal-ind-dot { width: 12px; height: 12px; top: -170px; margin-top: -6px; background: linear-gradient(135deg, #FF8C42, #FDBA74); box-shadow: 0 0 12px rgba(255, 140, 66, 0.8); }
.portal-ind-day .portal-ind-dot { width: 10px; height: 10px; top: -110px; margin-top: -5px; background: linear-gradient(135deg, #00D4E5, #67E8F9); box-shadow: 0 0 10px rgba(0, 212, 229, 0.8); }

/* Comet Tails */
.comet-tail {
  position: absolute;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  opacity: 0;
  filter: blur(1px);
  pointer-events: none;
}
.portal-ind-year .comet-tail { background: linear-gradient(to left, #E84A8A, transparent); }
.portal-ind-month .comet-tail { background: linear-gradient(to left, #FF8C42, transparent); }
.portal-ind-day .comet-tail { background: linear-gradient(to left, #00D4E5, transparent); }

/* Labels */
.year-labels, .month-labels { position: absolute; inset: 0; pointer-events: none; }
.year-label, .month-label {
  position: absolute;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  pointer-events: auto;
}
.year-label {
  font-family: 'Trispace', monospace;
  font-size: 0.75rem;
  color: #555;
}
.year-label:hover { color: #E84A8A; background: rgba(232, 74, 138, 0.15); }
.year-label.active { color: #F472B6; background: none; font-weight: 700; text-shadow: 0 0 10px rgba(232, 74, 138, 0.5); }

.month-label {
  font-family: 'Sono', sans-serif;
  font-size: 0.8rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.month-label:hover { color: #FF8C42; background: rgba(255, 140, 66, 0.15); }
.month-label.active { color: #FDBA74; background: none; font-weight: 700; text-shadow: 0 0 10px rgba(255, 140, 66, 0.5); }

/* Portal Center */
.portal-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.portal-center .month {
  font-family: 'Sono', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.portal-center .year {
  font-family: 'Trispace', monospace;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Controls */
.portal-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  align-items: center;
}
.controls-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
.portal-select {
  padding: 0.6rem 1rem;
  font-family: "Trispace", monospace;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}
.cancel-button, .today-button, .go-button {
  padding: 0.75rem 2rem;
  font-family: "Sono", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cancel-button {
  color: #888;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.cancel-button:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.today-button {
  color: #00D4E5;
  background: transparent;
  border: 1px solid rgba(0, 212, 229, 0.4);
}
.today-button:hover { color: #67E8F9; border-color: rgba(0, 212, 229, 0.7); box-shadow: 0 0 15px rgba(0, 212, 229, 0.3); }
.go-button {
  background: linear-gradient(135deg, #E84A8A, #FF8C42);
  border: none;
  color: #fff;
}
.go-button:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(232, 74, 138, 0.5); }

/* Traveling state */
.modal-content.traveling .year-label,
.modal-content.traveling .month-label {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-content.traveling .portal-ind-container {
  transition: transform 0.1s linear !important;
}

/* Portal tendril animation delays - extracted from inline styles */
.portal-tendril:nth-child(1) { animation-delay: 0s; }
.portal-tendril:nth-child(2) { animation-delay: -5s; }
.portal-tendril:nth-child(3) { animation-delay: -10s; }
.portal-tendril:nth-child(4) { animation-delay: -15s; }
