/* Timeline - Temporal Anomaly Viewer Styles */

/* Chrono Field Background */
.chrono-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

#time-distortion {
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

/* Temporal Viewer Layout */
.temporal-viewer {
  padding: 6rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Viewer Header */
.viewer-header {
  text-align: center;
  margin-bottom: 3rem;
}

.viewer-title {
  margin-bottom: 2rem;
}

.title-primary {
  display: block;
  font-size: 2.5rem;
  font-weight: 100;
  letter-spacing: 0.3rem;
  color: var(--color-text);
  animation: temporal-glitch 10s infinite;
}

.title-secondary {
  display: block;
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--color-alert);
  margin-top: 0.5rem;
  animation: blink 2s infinite;
}

/* Temporal Controls */
.temporal-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.time-control {
  background: var(--color-shadow);
  border: 1px solid var(--color-dim);
  color: var(--color-dim);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-control:hover {
  border-color: var(--color-glow);
  color: var(--color-glow);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.time-control.active {
  background: var(--color-glow);
  color: var(--color-void);
}

.time-control.glitch {
  border-color: var(--color-alert);
  color: var(--color-alert);
}

.time-control.glitch:hover {
  animation: glitch-button 0.3s infinite;
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

.control-icon {
  font-size: 1.2rem;
}

/* Temporal Readout */
.temporal-readout {
  background: var(--color-shadow);
  border: 1px solid var(--color-dim);
  border-radius: 20px;
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
}

.readout-label {
  color: var(--color-dim);
  font-size: 0.85rem;
}

.readout-value {
  color: var(--color-glow);
  font-size: 1rem;
  animation: pulse 2s infinite;
}

/* Timeline Matrix */
.timeline-matrix {
  position: relative;
  margin: 4rem 0;
  min-height: 800px;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(0, 255, 136, 0.02) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(136, 68, 255, 0.02) 50%, transparent 100%);
  border: 1px solid var(--color-shadow);
  border-radius: 8px;
  overflow: hidden;
}

.matrix-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 255, 136, 0.5) 50%, 
    transparent 100%);
  animation: scan 4s linear infinite;
}

/* Timeline Streams */
.timeline-stream {
  padding: 2rem;
  position: relative;
}

.stream-title {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-align: center;
  opacity: 0.7;
}

.timeline-stream.past {
  border-bottom: 1px solid var(--color-shadow);
}

.timeline-stream.past .stream-title {
  color: var(--color-dim);
}

.timeline-stream.present {
  background: rgba(0, 255, 136, 0.02);
  border-bottom: 1px solid var(--color-shadow);
}

.timeline-stream.present .stream-title {
  color: var(--color-glow);
}

.timeline-stream.future .stream-title {
  color: var(--color-mystery);
}

/* Temporal Events */
.temporal-event {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateX(-20px);
  animation: materialize 0.5s forwards;
  animation-delay: calc(var(--event-index, 0) * 0.1s);
}

.temporal-event:nth-child(2) { --event-index: 0; }
.temporal-event:nth-child(3) { --event-index: 1; }
.temporal-event:nth-child(4) { --event-index: 2; }
.temporal-event:nth-child(5) { --event-index: 3; }

.event-marker {
  width: 20px;
  height: 20px;
  background: var(--color-glow);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 10px var(--color-glow);
}

.event-marker::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100px;
  background: linear-gradient(180deg, var(--color-glow) 0%, transparent 100%);
}

.temporal-event.anomaly .event-marker {
  background: var(--color-alert);
  box-shadow: 0 0 20px var(--color-alert);
  animation: anomaly-pulse 2s infinite;
}

.temporal-event.classified .event-marker {
  background: var(--color-mystery);
  box-shadow: 0 0 20px var(--color-mystery);
}

.temporal-event.active .event-marker {
  animation: active-pulse 1s infinite;
}

.temporal-event.prediction .event-marker {
  background: transparent;
  border: 2px dashed var(--color-mystery);
  box-shadow: none;
}

.temporal-event.uncertain .event-marker {
  background: transparent;
  border: 2px dotted var(--color-alert);
  animation: uncertain 3s infinite;
}

/* Event Content */
.event-content {
  flex: 1;
  background: var(--color-shadow);
  border: 1px solid var(--color-dim);
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.temporal-event:hover .event-content {
  border-color: var(--color-glow);
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.2);
}

.event-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.event-title {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.event-description {
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.event-metadata {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.meta-item {
  color: var(--color-dim);
}

.meta-item em {
  color: var(--color-glow);
  font-style: normal;
}

.event-artifacts {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-void);
  border-radius: 4px;
}

.event-artifacts code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-glow);
}

.event-warning {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(255, 0, 128, 0.1);
  border: 1px solid var(--color-alert);
  border-radius: 4px;
  color: var(--color-alert);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.temporal-warning {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(136, 68, 255, 0.1);
  border: 1px solid var(--color-mystery);
  border-radius: 4px;
  color: var(--color-mystery);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.access-denied {
  margin-top: 1rem;
  text-align: center;
  color: var(--color-alert);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Quantum State */
.quantum-state {
  margin-top: 1rem;
  text-align: center;
}

.state-indicator {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-void);
  border: 1px solid var(--color-glow);
  border-radius: 20px;
  color: var(--color-glow);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  animation: quantum-fluctuation 3s infinite;
}

/* Temporal Anomalies */
.temporal-anomalies {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.anomaly {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, 
    rgba(255, 0, 128, 0.2) 0%, 
    transparent 70%);
  animation: anomaly-spin 10s linear infinite;
  cursor: pointer;
  pointer-events: all;
}

.anomaly:hover {
  background: radial-gradient(circle, 
    rgba(255, 0, 128, 0.4) 0%, 
    transparent 70%);
}

.anomaly-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-alert);
  text-align: center;
  white-space: nowrap;
}

.anomaly.hidden {
  opacity: 0;
  transition: opacity 0.5s;
}

.anomaly.hidden.revealed {
  opacity: 1;
}

/* Temporal Console */
.temporal-console {
  background: var(--color-shadow);
  border: 1px solid var(--color-dim);
  border-radius: 4px;
  margin: 3rem 0;
  overflow: hidden;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--color-void);
  border-bottom: 1px solid var(--color-shadow);
}

.console-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-glow);
  font-weight: 300;
}

.console-indicators {
  display: flex;
  gap: 1rem;
}

.indicator {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  background: var(--color-void);
}

.indicator[data-status="active"] {
  color: var(--color-glow);
  border: 1px solid var(--color-glow);
}

.indicator[data-status="warning"] {
  color: var(--color-alert);
  border: 1px solid var(--color-alert);
  animation: blink 1s infinite;
}

.console-output {
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.log-entry {
  color: var(--color-dim);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

/* Chronometer */
.chronometer {
  text-align: center;
  padding: 3rem;
  background: var(--color-shadow);
  border-radius: 4px;
  margin: 3rem 0;
}

.chrono-title {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.chrono-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-family: var(--font-mono);
  color: var(--color-glow);
  margin-bottom: 0.5rem;
  transition: all var(--transition-base);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-dim);
}

/* Animations */
@keyframes temporal-glitch {
  0%, 90%, 100% {
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  }
  91% {
    text-shadow: -3px 0 rgba(255, 0, 128, 0.5), 3px 0 rgba(136, 68, 255, 0.5);
  }
  92% {
    text-shadow: 3px 0 rgba(255, 0, 128, 0.5), -3px 0 rgba(136, 68, 255, 0.5);
    transform: skewX(-5deg);
  }
  93% {
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transform: skewX(0);
  }
}

@keyframes scan {
  0% {
    top: -2px;
  }
  100% {
    top: 100%;
  }
}

@keyframes materialize {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes anomaly-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes active-pulse {
  0%, 100% {
    box-shadow: 0 0 10px var(--color-glow);
  }
  50% {
    box-shadow: 0 0 30px var(--color-glow);
  }
}

@keyframes uncertain {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes quantum-fluctuation {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 0.8;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
  75% {
    opacity: 0.9;
    transform: scale(0.99);
  }
}

@keyframes anomaly-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glitch-button {
  0% {
    transform: scale(1) translateX(0);
  }
  25% {
    transform: scale(1.1) translateX(-2px);
  }
  50% {
    transform: scale(0.9) translateX(2px);
  }
  75% {
    transform: scale(1.05) translateX(-1px);
  }
  100% {
    transform: scale(1) translateX(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .title-primary {
    font-size: 1.5rem;
    letter-spacing: 0.1rem;
  }
  
  .temporal-controls {
    flex-wrap: wrap;
  }
  
  .temporal-readout {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .temporal-event {
    flex-direction: column;
    gap: 1rem;
  }
  
  .event-marker {
    margin-left: 2rem;
  }
  
  .event-marker::before {
    display: none;
  }
  
  .chrono-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .anomaly {
    width: 60px;
    height: 60px;
  }
  
  .anomaly-label {
    font-size: 0.6rem;
  }
}