* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "RyujinAttack";
  src:
    url("fonts/RyujinAttack.ttf") format("truetype"),
    url("fonts/RyujinAttack.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000000;
  font-family: "RyujinAttack", sans-serif;
  position: relative;
}

/* Three.js Canvas Container */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Content Overlay */
.content-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  pointer-events: none;
}

/* Glitch Effect */
.glitch-wrapper {
  position: relative;
}

.glitch-text {
  font-size: clamp(8rem, 20vw, 15rem);
  font-weight: 700;
  color: #ffffff;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.3);
  position: relative;
  letter-spacing: 0.1em;
  line-height: 1;
}

.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;
  animation: glitch-1 2s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  text-shadow: 2px 0 #ff00ff;
}

.glitch-text::after {
  color: #00ffff;
  animation: glitch-2 2.5s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  text-shadow: -2px 0 #00ffff;
}

@keyframes glitch-1 {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(2px, 2px);
  }
  60% {
    transform: translate(-2px, -2px);
  }
  80% {
    transform: translate(-2px, 2px);
  }
}

/* Message Container */
.message-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.subtitle {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.2rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.1rem;
  max-width: 600px;
}

/* Button Container */
.button-container {
  opacity: 0;
  animation: fadeInUp 1s ease-out 1s forwards;
  pointer-events: all;
}

.return-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  letter-spacing: 0.15rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.return-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
}

.return-button:hover::before {
  width: 300px;
  height: 300px;
}

.return-button:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.button-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.return-button:hover .button-icon {
  transform: rotate(-360deg);
}

.button-text {
  position: relative;
  z-index: 1;
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-symbol {
  position: absolute;
  font-size: clamp(2rem, 4vw, 4rem);
  color: rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
}

.floating-symbol:nth-child(1) {
  top: 10%;
  left: 10%;
  animation:
    float 6s ease-in-out infinite,
    fadeInOut 3s ease-in-out infinite;
}

.floating-symbol:nth-child(2) {
  top: 20%;
  right: 15%;
  animation:
    float 7s ease-in-out infinite 1s,
    fadeInOut 3s ease-in-out infinite 0.5s;
}

.floating-symbol:nth-child(3) {
  bottom: 20%;
  left: 20%;
  animation:
    float 8s ease-in-out infinite 2s,
    fadeInOut 3s ease-in-out infinite 1s;
}

.floating-symbol:nth-child(4) {
  bottom: 15%;
  right: 10%;
  animation:
    float 6.5s ease-in-out infinite 1.5s,
    fadeInOut 3s ease-in-out infinite 1.5s;
}

.floating-symbol:nth-child(5) {
  top: 50%;
  left: 5%;
  animation:
    float 7.5s ease-in-out infinite 0.5s,
    fadeInOut 3s ease-in-out infinite 2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(5deg);
  }
  50% {
    transform: translateY(-40px) translateX(-10px) rotate(-5deg);
  }
  75% {
    transform: translateY(-20px) translateX(10px) rotate(5deg);
  }
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.15;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scanline Effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%
  );
  background-size: 100% 4px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.1;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-overlay {
    padding: 2rem;
  }

  .glitch-text {
    font-size: clamp(6rem, 25vw, 10rem);
  }

  .floating-symbol {
    font-size: clamp(1.5rem, 5vw, 3rem);
  }
}

@media (max-width: 480px) {
  .return-button {
    padding: 0.8rem 2rem;
  }

  .message-container {
    padding: 0 1rem;
  }
}
