/* Shared Web-2000 styles for OnlyFerds. */

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 0 16px 2rem;
  font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive;
  font-size: 18px;
  color: #fff;
  text-align: center;
  overflow-x: hidden;
  background-color: hotpink;
  background-image:
    radial-gradient(#fff9 1px, transparent 2px),
    radial-gradient(#ffeb3b99 1px, transparent 2px);
  background-size:
    40px 40px,
    70px 70px;
  background-position:
    0 0,
    20px 35px;
}

body.xmas {
  background-color: #146b3a;
}

a {
  color: #ff0;
}

/* Scrolling ticker (the respectable cousin of <marquee>) */
.ticker {
  margin: 0 -16px;
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  border-bottom: 3px ridge silver;
  padding: 4px 0;
}

.ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 25s linear infinite;
}

@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}

/* WordArt: the gradient sits on .wordart spans so emoji next to them keep their colors */
.title {
  margin: 0.6em 0.2em;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: normal;
  line-height: 1.1;
  filter: drop-shadow(3px 3px 0 #000);
  animation: wobble 2.5s ease-in-out infinite;
}

.wordart {
  color: transparent;
  background: linear-gradient(
    90deg,
    red,
    orange,
    yellow,
    lime,
    cyan,
    blue,
    violet
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.xmas .wordart {
  background: repeating-linear-gradient(-45deg, #ff2b2b 0 14px, #fff 14px 28px);
  -webkit-background-clip: text;
  background-clip: text;
}

.wordart del {
  text-decoration-color: #000;
}

@keyframes wobble {
  50% {
    transform: rotate(-3deg) scale(1.05);
  }
}

.blink {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    visibility: hidden;
  }
}

/* Content boxes and beveled buttons */
.box {
  max-width: 680px;
  margin: 1.5rem auto;
  padding: 1rem;
  background: #fff;
  color: #000;
  border: 6px ridge #ff0;
  text-align: left;
}

.xmas .box {
  border-color: #e00;
}

.box h2 {
  margin-top: 0;
  text-align: center;
  font-family: Impact, "Arial Black", sans-serif;
  font-weight: normal;
  color: #f0f;
}

.btn {
  display: inline-block;
  padding: 0.5em 1em;
  background: #0ff;
  color: #00f;
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  border: 4px outset #0ff;
  cursor: pointer;
}

.btn:hover {
  background: #ff0;
  border-color: #ff0;
  animation: wobble 0.4s ease-in-out infinite;
}

.btn:active {
  border-style: inset;
}

/* Christmas banner */
.xmas-banner {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5em 1em;
  background: #c00;
  color: #fff;
  border: 4px dashed #fff;
  font-size: 1.3em;
  text-decoration: none;
}

/* Footer */
.footer {
  margin-top: 2rem;
  font-size: 15px;
}

.counter {
  display: inline-block;
  padding: 2px 6px;
  background: #000;
  color: #f22;
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 0.2em;
  border: 2px inset silver;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.badge {
  width: 88px;
  height: 31px;
  display: grid;
  place-items: center;
  font-family: Verdana, sans-serif;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.1;
  border: 2px outset #ccc;
}

/* Snow and cursor sparkles */
.flake,
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 10;
}

.flake {
  top: -2em;
  color: #fff;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

.sparkle {
  animation: sparkle 0.8s ease-out forwards;
}

@keyframes sparkle {
  to {
    opacity: 0;
    transform: translateY(24px) scale(0.3);
  }
}
