:root {
  --jungle: #145214;
  --banana: #ffe135;
  --hot: #ff00aa;
  --lime: #66ff33;
  --gold: #ffd700;
}

* {
  box-sizing: border-box;
  cursor: url("/graphics/banana-cursor.png") 2 39, auto;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--banana);
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  background-color: #145214;
  background-image: url("/graphics/jungle-tile.png?v=2");
  background-repeat: repeat;
  background-size: 160px 160px;
  image-rendering: pixelated;
  overflow-x: hidden;
}

#floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.floater {
  position: absolute;
  top: -12vh;
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 #000);
  animation-name: float-down;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.floater.spin {
  animation-name: float-spin;
}

@keyframes float-down {
  from {
    transform: translateY(-12vh) rotate(-18deg);
  }
  to {
    transform: translateY(118vh) rotate(18deg);
  }
}

@keyframes float-spin {
  from {
    transform: translateY(-12vh) rotate(0deg);
  }
  to {
    transform: translateY(118vh) rotate(360deg);
  }
}

.cursor-sparkle {
  position: fixed;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 30;
  image-rendering: pixelated;
  animation: pop-sparkle 0.55s linear forwards;
}

@keyframes pop-sparkle {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5) rotate(40deg);
  }
}

#gate[hidden] {
  display: none;
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background-color: #145214;
  background-image: url("/graphics/jungle-tile.png?v=2");
  background-repeat: repeat;
  background-size: 160px 160px;
  image-rendering: pixelated;
  text-align: center;
}

.gate-sign {
  width: min(520px, 92vw);
  padding: 28px 24px;
  background: navy;
  color: #fff;
  border: 8px ridge silver;
  box-shadow: 0 0 0 6px #000, 0 0 40px #ff0;
}

.gate-art {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.gate-art img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  animation: hop 0.7s ease-in-out infinite;
}

.gate-art img:nth-child(2) {
  animation-delay: 0.35s;
}

.gate-sign h1 {
  margin: 10px 0 12px;
  color: var(--banana);
  text-shadow: 3px 3px 0 #000;
}

.hot {
  color: #ff4d4d;
  font-size: 1.4rem;
  font-weight: bold;
}

.gate-wait {
  min-height: 2.4em;
  margin: 0 8px 4px;
  color: #fff76a;
  font-size: 14px;
  line-height: 1.25;
}

#enter {
  display: block;
  margin: 18px auto 4px;
  padding: 14px 22px;
  font: inherit;
  font-size: 1.15rem;
  font-weight: bold;
  color: #000;
  background: linear-gradient(#fff76a, #ffb000);
  border: 4px outset #fff;
}

#enter:active {
  border-style: inset;
}

#shrine[hidden] {
  display: none;
}

#shrine {
  position: relative;
  z-index: 2;
}

.top-ticker {
  display: block;
  position: relative;
  z-index: 6;
  background: #000;
  color: var(--lime);
  font-weight: bold;
  padding: 6px 0;
  border-bottom: 4px solid var(--hot);
}

.stage {
  width: min(1500px, 96vw);
  margin: 12px auto;
  background: #003300;
  border: 10px ridge var(--gold);
}

.side-art {
  display: none;
}

.dancer {
  display: block;
  width: 72px;
  height: 72px;
  margin: 16px auto;
  object-fit: contain;
  image-rendering: pixelated;
  animation: hop 0.7s ease-in-out infinite;
}

.dancer.delay {
  animation-delay: 0.35s;
}

@keyframes hop {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-10px) rotate(8deg);
  }
}

.main {
  padding: 10px 12px 16px;
  text-align: center;
}

.title-wrap {
  position: relative;
  z-index: 6;
  display: inline-block;
  padding: 18px 28px 8px;
}

.twinkle {
  position: absolute;
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  animation: twinkle 0.9s steps(2, end) infinite;
}

.twinkle.t1 {
  top: 0;
  left: 0;
}

.twinkle.t2 {
  top: 0;
  right: 0;
  animation-delay: 0.2s;
}

.twinkle.t3 {
  bottom: 4px;
  left: 12px;
  animation-delay: 0.45s;
}

.twinkle.t4 {
  bottom: 4px;
  right: 12px;
  animation-delay: 0.7s;
}

@keyframes twinkle {
  50% {
    opacity: 0;
    transform: scale(0.4);
  }
}

.rainbow-title {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  letter-spacing: 2px;
  background-image: linear-gradient(
    90deg,
    #ff0040,
    #ff7a00,
    #ffe135,
    #33ff66,
    #00d4ff,
    #cc66ff,
    #ff0040
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
  to {
    background-position: 220% 0;
  }
}

.subtitle {
  margin: 4px 0 10px;
  color: #fff76a;
  font-size: 16px;
}

.friday-board {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 96%);
  margin: 0 auto 14px;
  padding: 8px 12px;
  background: navy;
  border: 6px ridge silver;
  text-align: left;
  position: relative;
  z-index: 6;
}

.friday-board img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  animation: hop 0.7s ease-in-out infinite;
  flex: none;
}

.friday-copy {
  min-width: 0;
}

.friday-quote {
  margin: 0 0 4px;
  color: #fffde8;
  font-size: 14px;
  line-height: 1.25;
}

.friday-clock {
  margin: 0;
  color: #39ff14;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  font-weight: bold;
  text-shadow: 0 0 8px #39ff14;
}

body.its-friday {
  animation: jungle-crawl 12s linear infinite;
}

body.its-friday #gate {
  animation: jungle-crawl 12s linear infinite;
}

body.its-friday .dancer,
body.its-friday .gate-art img,
body.its-friday .friday-board img {
  animation-duration: 0.28s;
}

body.its-friday .rainbow-title {
  animation-duration: 0.45s;
}

body.its-friday .top-ticker {
  color: #ffe135;
  font-size: 1.05rem;
  border-bottom-color: #ffe135;
}

body.its-friday .stage {
  border-color: #ff00aa;
}

body.its-friday .friday-board {
  background: #4b0082;
  border-color: #ffe135;
}

body.its-friday .friday-clock {
  color: #ffe135;
  text-shadow: 0 0 8px #ffe135;
}

body.its-friday .gate-wait {
  color: #ff4d4d;
  font-size: 1.15rem;
  font-weight: bold;
}

@keyframes jungle-crawl {
  to {
    background-position: 160px 160px;
  }
}

.banana-break {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 8px 0 14px;
}

.banana-break img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.tv {
  margin: 0 auto;
  padding: 8px;
  width: 100%;
  background: #111;
  border: 8px ridge silver;
  box-shadow: inset 0 0 0 4px #000, 0 0 18px #000;
  position: relative;
  z-index: 6;
}

video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.caption {
  margin: 6px 0 10px;
  color: #c8ffc8;
  font-size: 11px;
}

.counter-box {
  display: inline-block;
  padding: 8px 12px;
  background: #000080;
  border: 6px ridge #c0c0c0;
  position: relative;
  z-index: 6;
}

.counter-label {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

.odometer {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin: 8px 0;
}

.odometer span {
  display: inline-block;
  min-width: 1.15em;
  padding: 3px 2px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: #39ff14;
  background: #111;
  border: 3px inset #444;
  text-shadow: 0 0 8px #39ff14;
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    visibility: hidden;
  }
}

footer {
  padding: 8px 12px 28px;
  text-align: center;
  color: var(--banana);
  font-size: 16px;
  font-weight: bold;
  text-shadow: 2px 2px 0 #000;
}

footer p {
  margin: 4px 0;
}

.duo {
  width: 100%;
}

.show {
  width: 72%;
}

.guestbook {
  width: 28%;
}

.guestbook {
  padding: 4px 6px 4px 10px;
  background: navy;
  border: 6px ridge silver;
  text-align: left;
  position: relative;
  z-index: 6;
}

.guestbook h2 {
  margin: 2px 0 2px;
  color: var(--banana);
  text-shadow: 2px 2px 0 #000;
  text-align: center;
  font-size: 1.35rem;
}

.wall-intro {
  margin: 0 0 4px;
  color: #fff76a;
  text-align: center;
  font-size: 13px;
}

.wall-count {
  margin: 0 0 8px;
  color: #c8ffc8;
  font-size: 12px;
  text-align: center;
}

#note-form {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 8px;
  background: #000060;
  border: 3px inset #333;
}

#note-form label {
  display: grid;
  gap: 2px;
  color: #fff;
  font-size: 12px;
}

#note-form input,
#note-form textarea {
  width: 100%;
  padding: 4px 6px;
  font: inherit;
  color: #111;
  background: #fffde8;
  border: 3px inset #ccc;
  resize: none;
}

#note-form button {
  justify-self: center;
  padding: 6px 16px;
  font: inherit;
  font-weight: bold;
  color: #000;
  background: linear-gradient(#fff76a, #ffb000);
  border: 4px outset #fff;
}

#note-form button:active {
  border-style: inset;
}

.wall-status {
  margin: 0;
  text-align: center;
  color: var(--lime);
  font-size: 12px;
}

.guest-log {
  max-height: 320px;
  overflow-y: auto;
  background: #001800;
  border: 3px inset #145214;
}

.guest-log::-webkit-scrollbar {
  width: 14px;
}

.guest-log::-webkit-scrollbar-track {
  background: #003300;
}

.guest-log::-webkit-scrollbar-thumb {
  background: var(--gold);
  border: 3px outset #fff76a;
}

.guest-entry {
  padding: 8px 10px;
  border-bottom: 1px dashed #ffe135;
  color: #fffde8;
}

.guest-entry:nth-child(odd) {
  background: #002800;
}

.guest-entry:nth-child(even) {
  background: #003c00;
}

.guest-entry header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--banana);
  font-size: 13px;
}

.guest-entry .from {
  font-weight: bold;
}

.guest-entry .when {
  color: #9f9;
  font-size: 11px;
  white-space: nowrap;
}

.guest-entry .message {
  margin: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.note-empty {
  margin: 12px 8px;
  color: #fff76a;
  font-size: 13px;
  text-align: center;
}

.mascots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 8px;
}

.mascots .dancer {
  display: inline-block;
  width: 56px;
  height: 56px;
  margin: 0;
}

[data-egg]:active {
  transform: scale(1.18) rotate(8deg);
}

body.ultra-funk .dancer,
body.ultra-funk .gate-art img {
  animation-duration: 0.22s;
}

body.ultra-funk .rainbow-title {
  animation-duration: 0.4s;
}

.secret-card {
  width: min(560px, 92vw);
  margin: 48px auto;
  padding: 28px 24px 22px;
  background: navy;
  color: #fff;
  border: 8px ridge silver;
  box-shadow: 0 0 0 6px #000, 0 0 40px #ff0;
  text-align: center;
}

.secret-card img.hero {
  width: 140px;
  height: 140px;
  object-fit: contain;
  image-rendering: pixelated;
  margin: 8px auto 12px;
  animation: hop 0.7s ease-in-out infinite;
}

.secret-card h1 {
  margin: 6px 0 10px;
  color: var(--banana);
  text-shadow: 3px 3px 0 #000;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
}

.secret-card p {
  margin: 8px 0;
  color: #fffde8;
}

.secret-card .bunch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 16px;
}

.secret-card .bunch img {
  width: 52px;
  height: 52px;
  image-rendering: pixelated;
}

.secret-card a {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  color: #000;
  font-weight: bold;
  text-decoration: none;
  background: linear-gradient(#fff76a, #ffb000);
  border: 4px outset #fff;
}

.secret-card a:active {
  border-style: inset;
}

@media (max-width: 900px) {
  .show,
  .guestbook {
    display: block;
    width: 100%;
  }

  .duo,
  .duo tbody,
  .duo tr {
    display: block;
    width: 100%;
  }

  .guestbook {
    margin-top: 10px;
  }

  .floater {
    width: 52px;
    height: 52px;
  }

  .odometer span {
    font-size: 1.3rem;
  }
}
