:root {
  --pink: #ff3ea5;
  --yellow: #fff200;
  --cyan: #00f0ff;
  --lime: #7CFF00;
  --ink: #111;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  color: var(--ink);
  background-color: var(--yellow);
  background-image:
    radial-gradient(var(--pink) 2px, transparent 2px),
    radial-gradient(var(--cyan) 2px, transparent 2px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><text y='32' font-size='32'>🦈</text></svg>") 4 4, auto;
}

button, img { cursor: inherit; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: #000; color: var(--lime);
  display: flex; align-items: center; justify-content: center;
  font-family: "Courier New", monospace;
  transition: opacity .5s;
}
#loader.gone { opacity: 0; pointer-events: none; }
.loader-box { width: min(420px, 90vw); text-align: center; }
.loader-shark { font-size: 64px; animation: spin 1s linear infinite; }
.bar { border: 2px solid var(--lime); height: 24px; margin: 12px 0; }
#bar-fill { height: 100%; width: 0; background: var(--lime); transition: width .2s; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--ink); color: var(--yellow);
  overflow: hidden; white-space: nowrap;
  font-weight: bold; padding: 8px 0; font-size: 18px;
  border-bottom: 4px dashed var(--pink);
}
.marquee span {
  display: inline-block; padding-left: 100%;
  animation: scroll 30s linear infinite;
}

/* ---------- header ---------- */
header { text-align: center; padding: 32px 16px 8px; }
.title {
  font-size: clamp(36px, 9vw, 110px);
  margin: 0; line-height: 1;
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 var(--cyan);
  display: flex; flex-direction: column; align-items: center;
}
.wobble { display: inline-block; animation: wobble 2s ease-in-out infinite; }
.rainbow {
  font-size: 1.3em;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, magenta, red);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: none;
  -webkit-text-stroke: 3px var(--ink);
  animation: rainbow 2s linear infinite, pulse 1s ease-in-out infinite;
}
.subtitle {
  font-size: clamp(16px, 3vw, 22px);
  background: #fff; display: inline-block; padding: 6px 14px;
  border: 3px solid var(--ink); transform: rotate(-2deg);
  box-shadow: 5px 5px 0 var(--ink);
}
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin: 24px auto 0; max-width: 900px;
}
.stat {
  background: var(--cyan); border: 3px solid var(--ink);
  padding: 10px 18px; box-shadow: 5px 5px 0 var(--ink);
  display: flex; flex-direction: column; min-width: 160px;
}
.stat:nth-child(2) { background: var(--pink); transform: rotate(2deg); }
.stat:nth-child(3) { background: var(--lime); transform: rotate(-3deg); }
.stat span { font-size: 32px; font-weight: bold; font-family: "Courier New", monospace; }

/* ---------- collage ---------- */
#collage {
  position: relative;
  max-width: 1400px; margin: 40px auto; padding: 0 16px;
  columns: 4 260px; column-gap: 24px;
}
.polaroid {
  break-inside: avoid;
  display: inline-block; width: 100%;
  background: #fff; padding: 12px 12px 8px;
  margin-bottom: 28px;
  border: 1px solid #ccc;
  box-shadow: 6px 8px 0 rgba(0,0,0,.8);
  transform: rotate(var(--rot, 0deg)) scale(var(--sc, 1));
  transition: transform .25s cubic-bezier(.3,1.8,.5,1), box-shadow .2s;
  position: relative;
}
.polaroid:hover {
  transform: rotate(calc(var(--rot) * -1.5)) scale(1.08);
  z-index: 5;
  box-shadow: 12px 14px 0 var(--pink);
}
.polaroid img, .polaroid video {
  width: 100%; display: block;
  filter: var(--filt, none);
  background: #eee;
}
.polaroid .cap {
  text-align: center; font-size: 18px; margin: 8px 0 2px; min-height: 1.2em;
}
.polaroid .tape {
  position: absolute; top: -12px; left: 50%;
  width: 90px; height: 26px;
  background: rgba(255, 255, 180, .75);
  transform: translateX(-50%) rotate(var(--tape, -4deg));
  border: 1px dashed rgba(0,0,0,.15);
}
.polaroid .sticker {
  position: absolute; font-size: 44px;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0 #000);
  animation: bob 1.4s ease-in-out infinite;
}
.polaroid .stamp {
  position: absolute; top: 40%; left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  border: 4px solid red; color: red;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 28px; padding: 2px 10px;
  letter-spacing: 2px; opacity: .85;
  pointer-events: none; white-space: nowrap;
  background: rgba(255,255,255,.2);
}
.polaroid.spin { animation: spin .8s ease-in-out; }
.polaroid.shake { animation: shake .5s; }

.empty-card {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  flex-direction: column; font-size: 64px; background: #eee; text-align: center;
}
.empty-card small { font-size: 14px; padding: 0 10px; }

/* ---------- sections ---------- */
section {
  max-width: 1000px; margin: 60px auto; padding: 24px 16px;
  text-align: center;
}
section h2 {
  font-size: clamp(26px, 5vw, 44px);
  display: inline-block; background: var(--ink); color: var(--yellow);
  padding: 6px 16px; transform: rotate(-1deg);
}

.award-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
}
.award {
  background: linear-gradient(135deg, #ffd700, #fff6a0, #d4a000);
  border: 3px solid var(--ink); border-radius: 50%;
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: bold; transition: transform .3s;
}
.award:hover { transform: rotate(360deg) scale(1.1); }
.award .emoji { font-size: 48px; }

.petition {
  background: #fff; border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--pink);
  position: relative;
}
.petition p { font-size: 20px; }
.petition-buttons {
  position: relative; min-height: 120px;
  display: flex; gap: 20px; justify-content: center; align-items: center; flex-wrap: wrap;
}
button {
  font-family: inherit; font-size: 20px; font-weight: bold;
  padding: 12px 24px; border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); background: var(--lime);
  transition: transform .1s;
}
button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
#nope-btn { background: #ff6b6b; transition: left .15s, top .15s; }
#nope-btn.fleeing { position: absolute; }

.reviews #review-list { display: grid; gap: 16px; text-align: left; }
.review {
  background: #fff; border: 3px solid var(--ink); padding: 14px 18px;
  box-shadow: 5px 5px 0 var(--ink);
}
.review:nth-child(odd) { transform: rotate(-.7deg); }
.review:nth-child(even) { transform: rotate(.7deg); }
.review .stars { color: #e6a800; font-size: 20px; }
.review .who { font-size: 14px; opacity: .7; }

footer {
  background: var(--ink); color: #fff; text-align: center;
  padding: 24px 16px; margin-top: 60px;
}
footer .tiny { font-size: 11px; opacity: .6; }

/* ---------- lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
#lightbox.hidden { display: none; }
.lb-inner {
  background: #fff; padding: 16px; max-width: 700px; width: 100%;
  text-align: center; border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--pink);
  animation: zoomin .4s cubic-bezier(.3,1.8,.5,1);
}
#lb-img { max-width: 100%; max-height: 65vh; display: block; margin: 0 auto; }
#lb-caption { font-size: 22px; font-weight: bold; }

/* ---------- toast & flying things ---------- */
#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150%);
  background: var(--ink); color: var(--yellow);
  padding: 12px 20px; border: 3px solid var(--pink);
  font-weight: bold; z-index: 950; transition: transform .3s;
  max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }

.faller {
  position: fixed; top: -60px; z-index: 800; pointer-events: none;
  font-size: 36px; animation: fall linear forwards;
}
.pop-text {
  position: fixed; z-index: 850; pointer-events: none;
  font-family: Impact, "Arial Black", sans-serif; font-size: 36px;
  color: var(--pink); -webkit-text-stroke: 2px #000;
  animation: popup 1s ease-out forwards;
}
.floater {
  position: fixed; z-index: 700; font-size: 60px; pointer-events: auto;
  animation: swim 12s linear forwards; user-select: none;
}

body.earthquake { animation: shake .5s infinite; }
body.upside-down { transform: rotate(180deg); transition: transform 1s; }

/* ---------- keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scroll { to { transform: translateX(-100%); } }
@keyframes wobble { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes rainbow { to { background-position: 200% center; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-6px) rotate(8deg); } }
@keyframes shake {
  0%,100% { transform: translate(0,0) rotate(var(--rot,0deg)); }
  20% { transform: translate(-8px,4px) rotate(-4deg); }
  40% { transform: translate(8px,-4px) rotate(4deg); }
  60% { transform: translate(-6px,-2px) rotate(-2deg); }
  80% { transform: translate(6px,2px) rotate(2deg); }
}
@keyframes fall { to { transform: translateY(calc(100vh + 120px)) rotate(720deg); } }
@keyframes popup {
  0% { transform: scale(.3) translateY(0); opacity: 1; }
  100% { transform: scale(1.4) translateY(-80px); opacity: 0; }
}
@keyframes zoomin { from { transform: scale(.2) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
@keyframes swim { from { left: -100px; } to { left: calc(100vw + 100px); } }

@media (max-width: 600px) {
  .polaroid .stamp { font-size: 20px; }
  .stat { min-width: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- floating 67s ---------- */
.six7 {
  position: fixed; bottom: -120px; z-index: 600;
  font-family: Impact, "Arial Black", sans-serif;
  font-weight: 900; color: var(--c, var(--pink));
  -webkit-text-stroke: 2px #000;
  text-shadow: 4px 4px 0 #000;
  user-select: none; pointer-events: auto;
  animation: floatUp var(--dur, 12s) linear forwards;
}
.six7 span {
  display: inline-block;
  animation: sway var(--sway, 2s) ease-in-out infinite alternate;
}
.six7.popped span { animation: pop67 .4s ease-out forwards; }
@keyframes floatUp { to { transform: translateY(calc(-100vh - 240px)); } }
@keyframes sway {
  from { transform: translateX(-30px) rotate(-15deg); }
  to   { transform: translateX(30px) rotate(15deg); }
}
@keyframes pop67 { to { transform: scale(3) rotate(40deg); opacity: 0; } }
