@import url("https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap");

:root {
  --bg: #0a0908;
  --bg-highlight: #1a1816;
  --ticket-cream: #0f0e0d; /* Dunklerer Terminal-Look */
  --accent-green: #00ff41; /* Klassisches Matrix/Terminal Grün */
  --accent-green-dim: rgba(0, 255, 65, 0.5);
  --ticket-border: #333;
  --text-main: #f5f0e8;
  --glare-color: rgba(0, 255, 65, 0.15); /* Hellerer Glare-Effekt */
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(
    circle at center,
    var(--bg-highlight) 0%,
    var(--bg) 80%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: "Space Mono", monospace;
  color: var(--text-main);
  overflow: hidden;
  position: relative;
}

/* Hintergrund-Gitter-Muster */
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  z-index: -2; /* Hinter der DVD-Ebene */
  animation: grid-pulse 4s infinite ease-in-out;
}

@keyframes grid-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Der Hintergrund-Layer für die DVD-Logik */
.dvd-background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.25;
}

.dvd-logo {
  position: absolute;
  width: 100px;
  height: 100px;
}

.dvd-logo img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 15px var(--accent-green));
}

/* Neue Container-Hierarchie für Tiefe */
.ticket-scene {
  position: relative;
  perspective: 1500px; /* Erhöhte Perspektive */
}

.ticket-container {
  position: relative;
  z-index: 10;
}

/* Neuer dynamischer Schatten-Layer */
.ticket-shadow {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 580px; /* Gleiche Breite wie ticket-wrap */
  height: 100%; /* Gleiche Höhe wie das Ticket */
  background: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  filter: blur(20px); /* Weicher Schatten */
  z-index: 5;
  pointer-events: none;
  transition: transform 0.1s ease-out; /* Folgt der Ticketbewegung, aber verzögert */
}

.ticket-link {
  text-decoration: none;
  color: inherit;
}

.ticket-wrap {
  position: relative;
  width: 580px;
  transform-style: preserve-3d;
  transform: rotateX(10deg) rotateY(-10deg);
  transition: transform 0.1s ease-out;
}

/* Mehrschichtiger Glare-Effekt */
.glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    var(--glare-color) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}

.ticket {
  background: var(--ticket-cream);
  border: 2px solid var(--accent-green);
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.ticket-wrap:hover .ticket {
  box-shadow: 0 0 50px rgba(0, 255, 65, 0.4);
}

/* Scanlines für Terminal-Feeling - feiner */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 0, 0, 0.3) 50%
  );
  background-size: 100% 2px;
  pointer-events: none;
  z-index: 5;
}

/* Löcher und Ränder - dezenter */
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--bg);
  z-index: 11;
  mask-repeat: repeat-x;
  -webkit-mask-repeat: repeat-x;
}
.ticket::before {
  top: -1px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpolygon points='0,0 8,10 16,0'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpolygon points='0,0 8,10 16,0'/%3E%3C/svg%3E");
}
.ticket::after {
  bottom: -1px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpolygon points='0,10 8,0 16,10'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpolygon points='0,10 8,0 16,10'/%3E%3C/svg%3E");
}

.hole {
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--bg);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
}
.hole.left {
  left: -14px;
}
.hole.right {
  right: -14px;
}

.ticket-inner {
  border: 1px solid #333;
  margin: 15px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--ticket-cream);
  overflow: hidden;
  min-height: 280px;
}

/* Subtile Vignette für mehr Tiefe */
.ticket-inner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
  z-index: 10;
}

.ticket-top-bar,
.ticket-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  font-size: 11px;
  color: var(--accent-green);
}

.ticket-content {
  padding: 50px 30px;
  text-align: center;
  position: relative;
}

/* Terminal-Eck-Markierungen */
.corner-borders {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--accent-green-dim);
  border-left: 2px solid var(--accent-green-dim);
  pointer-events: none;
}
.corner-borders::after {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--accent-green-dim);
  border-right: 2px solid var(--accent-green-dim);
}

.logo-text {
  font-size: 30px;
  letter-spacing: 3px;
  color: var(--accent-green);
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
  margin-bottom: 5px;
}
.tagline {
  font-size: 14px;
  opacity: 0.8;
  color: var(--text-main);
}

.terminal-status {
  margin-top: 25px;
  font-size: 11px;
  color: var(--accent-green);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  margin-right: 6px;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.1;
  }
}

/* Pulsierender ENTER Text */
.enter-call-to-action {
  margin: 25px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glitch-text {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 8px;
  position: relative;
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
  animation: pulse-glow 2s infinite ease-in-out;
}

/* Subtiler Glitch-Effekt */
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-text::before {
  color: #ff00ff;
  z-index: -1;
  animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  color: #00ffff;
  z-index: -2;
  animation: glitch-anim 2s infinite linear alternate;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
    text-shadow: 0 0 40px rgba(0, 255, 65, 0.9);
  }
}

@keyframes glitch-anim {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

/* Ladebalken-Effekt */
.terminal-loader {
  display: inline-block;
  width: 30px;
  height: 6px;
  background-color: #222;
  position: relative;
  overflow: hidden;
}
.terminal-loader::after {
  content: "";
  position: absolute;
  left: -30px;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent-green);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -30px;
  }
  100% {
    left: 30px;
  }
}

/* Stile für Konfetti & Emojis im Hintergrund */
.confetti,
.emoji {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.confetti {
  width: 8px;
  height: 8px;
  animation: confetti-fall 2s ease-out forwards;
}
.emoji {
  font-size: 24px;
  animation: emoji-explode 2s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.6) rotate(360deg);
    opacity: 0;
  }
}
@keyframes emoji-explode {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(1.8);
    opacity: 0;
  }
}
