@font-face {
  font-family: nightmare;
  src: url("font.otf") format("opentype");
}

body {
  background-color: #cccccc;
}

header > h1 {
  font-family: nightmare;
  font-size: 80px;
  margin: 0;
  font-weight: 100;
  color: white;
}

@font-face {
  font-family: nightmare;
  src: url("font.otf") format("opentype");
}

:root {
  --color1: chartreuse;
  --color2: white;
  --text-shadow:
    0px 0px 1px #fcf1fc, 0px -2px 1px #5b50bf, 0px -4px 1px #2719b9,
    0px 2px 1px #ce942d, 0px 4px 1px #c35520;
}

::selection {
  background-color: transparent;
  color: yellow;
}

body {
  background-color: black;
  background-image: url("jellyfish-dance.gif");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: Courier;

  color: transparent;
  text-shadow: var(--text-shadow);
}

header {
  transform: rotate(1deg);
}

h1 {
  font-family: nightmare;
  font-size: 80px;
  margin: 0;
  font-weight: 100;
  text-align: center;
  transition: 0.3s ease-out;
}

h2 {
  font-family: nightmare;
  font-size: 50px;
  font-weight: 100;
  text-align: center;
}

header > h1:hover {
  color: yellow;
  text-shadow: 5px 5px 5px cyan;
  transition: 0.3s ease-out;
  transform: rotate(-5deg);
  filter: blur(1px);
}

.box3 span {
  display: inline-block;
  color: yellow;
  text-shadow: 5px 5px 5px cyan;
  filter: blur(1px);
  transform: rotate(-5deg);
}

.main {
  display: grid;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border-width: 5px;
  border-style: double none;
}

nav > a:nth-child(even) {
  transform: rotate(-1deg);
}

nav > a:nth-child(odd) {
  transform: rotate(1deg);
}

nav > a {
  margin: 10px;
  font-size: 25px;
  color: yellow;
  text-decoration: cyan dotted underline;
  transition: 0.3s ease-out;
}

nav > a {
  animation: 6s infinite nav;
}

nav > a:nth-child(even):hover {
  color: cyan;
  text-decoration-color: white;
  text-decoration-style: wavy;
  transform: rotate(5deg);
}

nav > a:nth-child(odd):hover {
  color: cyan;
  text-decoration-color: white;
  text-decoration-style: wavy;
  transform: rotate(-5deg);
}

#container {
  position: relative;
  z-index: 1;
  margin-left: auto;
  margin-right: auto;
  padding-left: 25px;
  padding-right: 25px;
}

/* Minecraft-style splash text */
.splash-text {
  position: absolute;
  top: 60px;
  left: 50px;
  color: yellow;
  font-family: 'MS Gothic', 'Courier New', monospace;
  font-size: 28px;
  font-weight: bold;
  transform: rotate(-20deg);
  text-shadow: 2px 2px 0px #3f3f00;
  z-index: 50;
  pointer-events: none;
  animation: splash-pulse 1s ease-in-out infinite alternate;
  white-space: nowrap;
}

@keyframes splash-pulse {
  from {
    transform: rotate(-20deg) scale(1);
  }
  to {
    transform: rotate(-20deg) scale(1.15);
  }
}

/* Jellyfish color wash — fullscreen background overlay */
.jellyfish-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.jellyfish-overlay img {
  display: none;
}

.jellyfish-color-wash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: color;
  opacity: 0.5;
  animation: jellyfish-wash 3s linear infinite;
}

/* Bouncing jellyfish swarm */
.jelly-bouncer {
  position: fixed;
  width: 120px;
  height: 120px;
  z-index: 9999;
  pointer-events: auto;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}

.jelly-bouncer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jelly-bouncer .jellyfish-color-wash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  mix-blend-mode: color;
  opacity: 0.6;
  animation: jellyfish-wash 3s linear infinite;
  pointer-events: none;
}

/* Each jellyfish gets unique horizontal & vertical bounce timings */
@keyframes jb-x {
  0% {
    left: 0;
  }
  100% {
    left: calc(100vw - 120px);
  }
}
@keyframes jb-y {
  0% {
    top: 0;
  }
  100% {
    top: calc(100vh - 120px);
  }
}

.jb-1 {
  animation:
    jb-x 5.2s ease-in-out infinite alternate,
    jb-y 3.8s ease-in-out infinite alternate;
}
.jb-1 .jellyfish-color-wash {
  animation-delay: 0s;
}

.jb-2 {
  animation:
    jb-x 4.5s ease-in-out infinite alternate-reverse,
    jb-y 5.1s ease-in-out infinite alternate;
}
.jb-2 .jellyfish-color-wash {
  animation-delay: 0.4s;
}

.jb-3 {
  animation:
    jb-x 6s ease-in-out infinite alternate,
    jb-y 4.2s ease-in-out infinite alternate-reverse;
}
.jb-3 .jellyfish-color-wash {
  animation-delay: 0.8s;
}

.jb-4 {
  animation:
    jb-x 3.9s ease-in-out infinite alternate-reverse,
    jb-y 5.7s ease-in-out infinite alternate-reverse;
}
.jb-4 .jellyfish-color-wash {
  animation-delay: 1.2s;
}

.jb-5 {
  animation:
    jb-x 5.8s ease-in-out infinite alternate,
    jb-y 3.3s ease-in-out infinite alternate;
}
.jb-5 .jellyfish-color-wash {
  animation-delay: 1.6s;
}

.jb-6 {
  animation:
    jb-x 4.1s ease-in-out infinite alternate-reverse,
    jb-y 6.2s ease-in-out infinite alternate;
}
.jb-6 .jellyfish-color-wash {
  animation-delay: 2s;
}

.jb-7 {
  animation:
    jb-x 5.5s ease-in-out infinite alternate,
    jb-y 4.8s ease-in-out infinite alternate-reverse;
}
.jb-7 .jellyfish-color-wash {
  animation-delay: 2.4s;
}

.jb-8 {
  animation:
    jb-x 3.6s ease-in-out infinite alternate-reverse,
    jb-y 5.4s ease-in-out infinite alternate;
}
.jb-8 .jellyfish-color-wash {
  animation-delay: 0.3s;
}

.jb-9 {
  animation:
    jb-x 6.3s ease-in-out infinite alternate,
    jb-y 3.5s ease-in-out infinite alternate-reverse;
}
.jb-9 .jellyfish-color-wash {
  animation-delay: 1s;
}

.jb-10 {
  animation:
    jb-x 4.7s ease-in-out infinite alternate-reverse,
    jb-y 5.9s ease-in-out infinite alternate-reverse;
}
.jb-10 .jellyfish-color-wash {
  animation-delay: 1.8s;
}

@keyframes jellyfish-wash {
  0% {
    background-color: #ff00ff;
  } /* hot pink */
  16% {
    background-color: #00ffff;
  } /* electric cyan */
  33% {
    background-color: #39ff14;
  } /* neon green */
  50% {
    background-color: #bf00ff;
  } /* purple */
  66% {
    background-color: #ffff00;
  } /* electric yellow */
  83% {
    background-color: #ff6ec7;
  } /* neon pink */
  100% {
    background-color: #ff00ff;
  }
}

@keyframes nav {
  from {
    margin: 10px;
    font-size: 25px;
    color: yellow;
    text-decoration: cyan dotted underline;
    transition: 0.3s ease-out;
  }

  89.5% {
    color: yellow;
  }
  90% {
    color: red;
  }

  to {
    color: yellow;
  }
}

main {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.box1 {
  transform: rotate(-2deg);
  min-width: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0;
  border: 3px dashed white;
  text-shadow: var(--text-shadow);
  padding: 15px;
}

.box1 h3,
.box1 h2 {
  margin: 0;
}
.box2-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.box2 {
  transform: rotate(2deg);
  height: 200px;
  min-width: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0;
  border: 3px dashed white;
  text-shadow: var(--text-shadow);
  padding: 15px;
}

.box2 h2 {
  margin: 0;
}

.box3 {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px dashed white;
  text-shadow: var(--text-shadow);
  padding: 15px;
  text-align: center;
}

footer {
  border: 2px dashed;
  padding: 10px;
  text-align: center;
  transform: rotate(1deg);
}

/* GIF row layout */
.gif-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 30px auto;
}

/* Neo GIF with color overlay */
.neo-container {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0;
  max-width: 500px;
  flex: 1 1 200px;
  overflow: hidden;
  border-radius: 8px;
}
.rms-container {
  position: relative;
  display: flex;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

.neo-container img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.4);
}

.neo-container .jellyfish-color-wash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: color;
  opacity: 0.5;
  animation: jellyfish-wash 3s linear infinite;
  pointer-events: none;
}

.marquee-wrapper {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  border: 5p dotted red;
}

.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Matrix-themed buttons */
.matrix-btn {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid #00ff00;
  background: transparent;
  color: #00ff00;
  font-family: "MS Gothic", "Courier New", monospace;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  text-shadow:
    0 0 8px #00ff00,
    0 0 16px #00ff0088;
  box-shadow:
    0 0 8px #00ff0044,
    inset 0 0 8px #00ff0022;
}

.matrix-btn:hover {
  background: #00ff0022;
  color: #fff;
  text-shadow:
    0 0 12px #fff,
    0 0 24px #00ff00;
  box-shadow:
    0 0 20px #00ff0088,
    inset 0 0 15px #00ff0044;
}

strong {
  font-weight: bold;
  font-size: 18px;
  color: cyan;
}

/* Matrix character trail */
.matrix-trail {
  position: fixed;
  font-family: "MS Gothic", "Courier New", monospace;
  font-size: 18px;
  pointer-events: none;
  z-index: 9998;
  text-shadow: 0 0 8px currentColor;
  animation: matrix-fall linear forwards;
  opacity: 1;
}

@keyframes matrix-fall {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Matrix burst explosion */
.matrix-burst {
  position: fixed;
  font-family: "MS Gothic", "Courier New", monospace;
  font-size: 22px;
  pointer-events: none;
  z-index: 10000;
  text-shadow:
    0 0 12px currentColor,
    0 0 24px currentColor;
  animation: matrix-burst-fly linear forwards;
  opacity: 1;
}

@keyframes matrix-burst-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  70% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate(var(--bx), var(--by)) scale(0.3);
  }
}

/* ====== JELLYFISH JAM ====== */

/* Bouncy bob with squash-and-stretch like the jellyfish */
@keyframes jellyfish-bob {
  0% {
    transform: translateY(0) scaleY(1) scaleX(1);
  }
  15% {
    /* snap upward — the "beat hit" */
    transform: translateY(-18px) scaleY(1.12) scaleX(0.94);
  }
  30% {
    /* slam back down, squash on landing */
    transform: translateY(4px) scaleY(0.88) scaleX(1.08);
  }
  45% {
    /* secondary smaller bounce */
    transform: translateY(-8px) scaleY(1.05) scaleX(0.97);
  }
  60% {
    transform: translateY(2px) scaleY(0.96) scaleX(1.03);
  }
  75% {
    transform: translateY(-3px) scaleY(1.02) scaleX(0.99);
  }
  100% {
    transform: translateY(0) scaleY(1) scaleX(1);
  }
}

/* Neon color cycle — jellyfish rave palette */
@keyframes jellyfish-colors {
  0% {
    color: #ff00ff;
    text-shadow:
      0 0 10px #ff00ff,
      0 0 30px #ff00ff88;
  } /* hot pink */
  16% {
    color: #00ffff;
    text-shadow:
      0 0 10px #00ffff,
      0 0 30px #00ffff88;
  } /* electric cyan */
  33% {
    color: #39ff14;
    text-shadow:
      0 0 10px #39ff14,
      0 0 30px #39ff1488;
  } /* neon green */
  50% {
    color: #bf00ff;
    text-shadow:
      0 0 10px #bf00ff,
      0 0 30px #bf00ff88;
  } /* purple */
  66% {
    color: #ffff00;
    text-shadow:
      0 0 10px #ffff00,
      0 0 30px #ffff0088;
  } /* electric yellow */
  83% {
    color: #ff6ec7;
    text-shadow:
      0 0 10px #ff6ec7,
      0 0 30px #ff6ec788;
  } /* neon pink */
  100% {
    color: #ff00ff;
    text-shadow:
      0 0 10px #ff00ff,
      0 0 30px #ff00ff88;
  }
}

/* Pulsing neon border glow for containers */
@keyframes jellyfish-border-glow {
  0% {
    border-color: #ff00ff;
    box-shadow:
      0 0 8px #ff00ff88,
      inset 0 0 8px #ff00ff44;
  }
  16% {
    border-color: #00ffff;
    box-shadow:
      0 0 8px #00ffff88,
      inset 0 0 8px #00ffff44;
  }
  33% {
    border-color: #39ff14;
    box-shadow:
      0 0 8px #39ff1488,
      inset 0 0 8px #39ff1444;
  }
  50% {
    border-color: #bf00ff;
    box-shadow:
      0 0 8px #bf00ff88,
      inset 0 0 8px #bf00ff44;
  }
  66% {
    border-color: #ffff00;
    box-shadow:
      0 0 8px #ffff0088,
      inset 0 0 8px #ffff0044;
  }
  83% {
    border-color: #ff6ec7;
    box-shadow:
      0 0 8px #ff6ec788,
      inset 0 0 8px #ff6ec744;
  }
  100% {
    border-color: #ff00ff;
    box-shadow:
      0 0 8px #ff00ff88,
      inset 0 0 8px #ff00ff44;
  }
}

/* Apply the jam to header */
header {
  animation:
    jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite,
    jellyfish-colors 3s linear infinite;
}

/* Container bobs on a slight delay so it feels like a wave */
#container {
  animation: jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite 0.1s;
}

/* Boxes get the bounce + glowing borders */
.box1 {
  animation:
    jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite 0.15s,
    jellyfish-border-glow 3s linear infinite;
}

.box2 {
  animation:
    jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite 0.25s,
    jellyfish-border-glow 3s linear infinite 0.5s;
}

/* Nav bounces and color-cycles with staggered child delays */
nav {
  animation: jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite 0.05s;
}

nav > a {
  animation:
    jellyfish-colors 2.5s linear infinite,
    jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

/* Stagger each nav link for the wave effect */
nav > a:nth-child(1) {
  animation-delay: 0s, 0s;
}
nav > a:nth-child(2) {
  animation-delay: 0.4s, 0.07s;
}
nav > a:nth-child(3) {
  animation-delay: 0.8s, 0.14s;
}
nav > a:nth-child(4) {
  animation-delay: 1.2s, 0.21s;
}
nav > a:nth-child(5) {
  animation-delay: 1.6s, 0.28s;
}
nav > a:nth-child(6) {
  animation-delay: 2s, 0.35s;
}

/* Footer gets the jam too */
footer {
  animation:
    jellyfish-bob 0.6s cubic-bezier(0.22, 1, 0.36, 1) infinite 0.3s,
    jellyfish-border-glow 3s linear infinite 1s;
}
