/* LE MAGNIFIQUE ZOO DE GALA — CSS 2000s vibes */

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

body {
  background: #fff9e6;
  background-image:
    radial-gradient(circle, #ffcccc 1px, transparent 1px),
    radial-gradient(circle, #ccffcc 1px, transparent 1px);
  background-size: 30px 30px, 60px 60px;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  color: #333;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ctext y='16' font-size='16'%3E🐾%3C/text%3E%3C/svg%3E") 10 10, auto;
}

a { color: inherit; text-decoration: none; }

/* ── Header ── */
.zoo-header {
  background: linear-gradient(135deg, #ff6b9d, #ff9f43, #ffd93d, #6bcb77, #4d96ff);
  background-size: 400% 400%;
  animation: gradientShift 4s ease infinite;
  text-align: center;
  padding: 1rem 0;
  border-bottom: 4px dashed #fff;
}
.zoo-header--small { padding: .6rem 0; }

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.zoo-header__stars {
  font-size: .8rem;
  letter-spacing: .1em;
  color: rgba(255,255,255,.9);
  padding: .3rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.zoo-header__inner {
  padding: 1.5rem 1rem;
}

.zoo-header__badge {
  display: inline-block;
  background: #fff;
  color: #ff6b9d;
  font-weight: 700;
  font-size: .85rem;
  padding: .3em 1em;
  border-radius: 20px;
  margin-bottom: 1rem;
  animation: pulse 1s ease-in-out infinite alternate;
  box-shadow: 0 0 10px rgba(255,255,255,.8);
}

@keyframes pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

.zoo-title {
  font-family: 'Abril Fatface', serif;
  font-size: clamp(2rem, 8vw, 4rem);
  color: #fff;
  text-shadow:
    3px 3px 0 #ff6b9d,
    -1px -1px 0 #4d96ff;
  line-height: 1.2;
  margin-bottom: .5rem;
}

.zoo-title__sub {
  display: block;
  font-size: .7em;
  color: #fffbe6;
  text-shadow: 2px 2px 0 rgba(0,0,0,.2);
}

.zoo-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.95);
  text-shadow: 1px 1px 0 rgba(0,0,0,.2);
  margin-bottom: 1rem;
}
.zoo-subtitle small { font-size: .8em; opacity: .85; }

.zoo-header__visitor {
  display: inline-block;
  background: rgba(0,0,0,.2);
  color: #fff;
  font-size: .8rem;
  padding: .3em 1em;
  border-radius: 4px;
}

/* ── Marquee ── */
.zoo-marquee-wrap {
  background: #ff6b9d;
  overflow: hidden;
  padding: .4rem 0;
}
.zoo-marquee {
  display: inline-block;
  white-space: nowrap;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  animation: marquee 12s linear infinite;
  letter-spacing: .1em;
}
@keyframes marquee {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ── Main ── */
.zoo-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Welcome ── */
.zoo-welcome {
  margin-bottom: 3rem;
}
.zoo-welcome__frame {
  background: #fff;
  border: 3px solid #ff6b9d;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 6px 6px 0 #ffd93d, 12px 12px 0 #ff6b9d;
}
.zoo-welcome__frame h2 {
  font-family: 'Abril Fatface', serif;
  font-size: 1.8rem;
  color: #ff6b9d;
  margin-bottom: 1rem;
}
.zoo-welcome__frame p {
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.zoo-welcome__divider {
  color: #ff9f43;
  font-size: 1.2rem;
  margin: 1rem 0;
}
.zoo-welcome__warning {
  background: #fff9e6;
  border: 2px dashed #ff9f43;
  border-radius: 8px;
  padding: 1rem;
  font-size: .9rem;
  color: #c0392b;
}

/* ── Section title ── */
.zoo-section-title {
  font-family: 'Abril Fatface', serif;
  font-size: 2rem;
  color: #4d96ff;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 0 #ffd93d;
}

/* ── Animal grid ── */
.zoo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.animal-card {
  background: #fff;
  border: 3px solid #6bcb77;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 4px 4px 0 #ffd93d;
}
.animal-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 8px 8px 0 #ff6b9d;
}
.animal-card--soon {
  border-color: #ccc;
  opacity: .85;
}

.animal-card__img-wrap {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f0f0f0;
}
.animal-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.animal-card__placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  gap: .5rem;
  background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
  color: #999;
  font-family: 'Comic Neue', cursive;
  text-align: center;
  line-height: 1.4;
  font-size: 1rem;
}
.animal-card__placeholder { font-size: 2rem; }

.animal-card__badge {
  position: absolute;
  top: .5rem; right: .5rem;
  background: #ff6b9d;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .25em .6em;
  border-radius: 20px;
  animation: pulse 1s ease-in-out infinite alternate;
}

.animal-card__body {
  padding: 1rem;
  text-align: center;
}
.animal-card__body h3 {
  font-family: 'Abril Fatface', serif;
  font-size: 1.5rem;
  color: #333;
  margin-bottom: .2rem;
}
.animal-card__species {
  font-size: .75rem;
  color: #ff6b9d;
  font-weight: 700;
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.animal-card__desc {
  font-size: .82rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.animal-card__btn {
  display: inline-block;
  background: #4d96ff;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  padding: .5em 1.2em;
  border-radius: 20px;
  transition: background .2s;
}
.animal-card:hover .animal-card__btn { background: #ff6b9d; }

/* ── Animal page ── */
.animal-page {
  width: 100%;
  margin: 0 auto;
}
.animal-page__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.animal-page__img-frame {
  border: 4px solid #ff6b9d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 8px 8px 0 #ffd93d;
  position: relative;
  background: #f0f0f0;
  height: auto;
}
.animal-page__img-frame img {
  width: 100%;
  height: 110%;
  display: block;
  object-fit: cover;
}
.animal-page__img-frame--soon {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: #ccc;
  box-shadow: 8px 8px 0 #e0e0e0;
}
.soon-content {
  text-align: center;
  padding: 2rem;
}
.soon-emoji { font-size: 4rem; margin-bottom: 1rem; }
.soon-text { font-size: 1.2rem; font-weight: 700; color: #888; margin-bottom: 1rem; }
.soon-loader span {
  animation: blink 1s infinite;
  font-size: 2rem;
  color: #ccc;
}
.soon-loader span:nth-child(2) { animation-delay: .2s; }
.soon-loader span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100% { opacity: 0; } 50% { opacity: 1; } }

.animal-page__paws {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.9);
  text-align: center;
  padding: .4rem;
  font-size: 1.2rem;
}

.animal-page__badge-vip {
  display: inline-block;
  background: #ff6b9d;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .4em 1.2em;
  border-radius: 20px;
  margin-bottom: 1rem;
  animation: pulse 1s ease-in-out infinite alternate;
}

.animal-page__name {
  font-family: 'Abril Fatface', serif;
  font-size: 3rem;
  color: #333;
  text-shadow: 3px 3px 0 #ffd93d;
  margin-bottom: .3rem;
}
.animal-page__species {
  font-size: .85rem;
  color: #ff6b9d;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.animal-page__table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .85rem;
}
.animal-page__table tr { border-bottom: 1px dashed #ffcccc; }
.animal-page__table td { padding: .5rem .3rem; }
.animal-page__table td:first-child { color: #ff6b9d; font-weight: 700; white-space: nowrap; width: 40%; }

.animal-page__fun {
  background: #fffbe6;
  border: 2px dashed #ffd93d;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.animal-page__fun h3 { color: #ff9f43; margin-bottom: .6rem; font-size: .9rem; }
.animal-page__fun ul { padding-left: 1.2rem; }
.animal-page__fun li { margin-bottom: .4rem; font-size: .82rem; line-height: 1.5; list-style: "🐾 "; }

.animal-page__quote {
  background: #fff;
  border-left: 4px solid #ff6b9d;
  padding: .8rem 1rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.animal-page__quote p { font-size: .9rem; margin-bottom: .2rem; }
.animal-page__quote small { font-size: .72rem; color: #999; }

.animal-page__gallery-title {
  text-align: center;
  font-weight: 700;
  color: #ff6b9d;
  margin-bottom: 1rem;
}
.animal-page__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin-bottom: 2rem;
}
.animal-page__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  margin-bottom: 2rem;
}
.gallery-item {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #f0e8ff;
  border: 2px dashed #d4aaff;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-empty-label {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: #bbb;
  font-family: monospace;
  text-align: center;
}
.gallery-item--empty img { display: none; }
.gallery-item--empty .gallery-empty-label { display: flex; }
.gallery-item--empty { background: #f5f5f5; border-color: #ddd; }

.animal-page__nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.zoo-btn {
  display: inline-block;
  background: #4d96ff;
  color: #fff;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: .9rem;
  padding: .7em 1.5em;
  border-radius: 20px;
  transition: background .2s, transform .1s;
  box-shadow: 3px 3px 0 #333;
}
.zoo-btn:hover { background: #ff6b9d; transform: translateY(-2px); }

.zoo-back-link {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  background: rgba(0,0,0,.2);
  padding: .3em .8em;
  border-radius: 20px;
  margin-bottom: .5rem;
}

/* ── Footer ── */
.zoo-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  font-size: .82rem;
  color: #888;
  line-height: 2;
}
.zoo-footer__divider { color: #ff9f43; margin: .5rem 0; letter-spacing: .1em; }
.zoo-footer__secret { font-size: .75rem; color: #bbb; }
.zoo-back { color: #4d96ff; font-weight: 700; text-decoration: underline; }

/* ── Sparkles ── */
#sparkle-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  font-size: 1.2rem;
  pointer-events: none;
  animation: sparkle-fall .8s ease-out forwards;
}
@keyframes sparkle-fall {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(30px) rotate(180deg) scale(0); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .zoo-grid { grid-template-columns: 1fr; }
  .animal-page__hero { grid-template-columns: 1fr; }
  .animal-page__name { font-size: 2rem; }
}
