
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ff00ff;
  color: white;
  font-family: SimSun, Arial, sans-serif;
  padding-bottom: 140px;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text y='24' font-size='24'>❤</text></svg>") 16 16, auto;
}

input[type="radio"] {
  display: none;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 6px ridge #ffff00;
  background: rgba(255, 255, 255, 0.16);
}

.logo {
  font-size: 32px;
  color: #ffff00;
  font-weight: bold;
  text-shadow: 3px 3px red;
  animation: shake 0.7s infinite;
}

.nav a,
.nav label {
  color: white;
  margin-left: 18px;
  font-size: 20px;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

.nav a:hover,
.nav label:hover {
  color: #ffff00;
  text-shadow: 2px 2px red;
}

.marquee {
  background: #ffff00;
  color: red;
  font-size: 22px;
  font-weight: bold;
  padding: 8px;
}

.search-box {
  max-width: 1000px;
  margin: 30px auto;
  padding: 22px;
  text-align: center;
  border: 5px dotted #ffff00;
  background: rgba(0, 0, 0, 0.25);
}

.search-box h1 {
  font-family: Arial, sans-serif;
  color: #ffff00;
  font-size: 42px;
  text-shadow: 3px 3px red;
}

.filter-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-labels label {
  display: inline-block;
  padding: 10px 16px;
  background: white;
  color: red;
  font-weight: bold;
  border: 5px outset #ffff00;
  cursor: pointer;
}

.filter-labels label:active {
  transform: scale(0.92);
  border-style: inset;
}

#all:checked ~ .search-box label[for="all"],
#devon:checked ~ .search-box label[for="devon"],
#british:checked ~ .search-box label[for="british"],
#domestic-long:checked ~ .search-box label[for="domestic-long"],
#domestic-short:checked ~ .search-box label[for="domestic-short"],
#ragdoll:checked ~ .search-box label[for="ragdoll"],
#tabby:checked ~ .search-box label[for="tabby"],
#maine:checked ~ .search-box label[for="maine"],
#poodle:checked ~ .search-box label[for="poodle"],
#pomeranian:checked ~ .search-box label[for="pomeranian"],
#whippet:checked ~ .search-box label[for="whippet"],
#miniature-dachshund:checked ~ .search-box label[for="miniature-dachshund"] {


  background: #ffff00;
  color: red;
  box-shadow: 0 0 12px #ffff00, 0 0 18px white;
}

.pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
}

.pet-card {
  position: relative;
  text-align: center;
  padding: 12px;
  border: 5px ridge white;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.2s, background 0.2s;
}

.pet-card:hover {
  transform: scale(1.05) rotate(-2deg);
  background: rgba(255, 255, 0, 0.28);
}

.pet-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 4px solid #ffff00;
  background: white;
}

.name {
  color: #ffff00;
  font-size: 21px;
  font-weight: bold;
  margin-top: 8px;
  text-shadow: 2px 2px red;
}

.age {
  font-size: 16px;
  font-weight: bold;
}

.breed {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 10px;
  background: #ffff00;
  color: red;
  font-size: 14px;
  font-weight: bold;
  border: 3px outset white;
}

.pet-card[data-type="dog"] .breed {
  background: #00ff66;
  color: black;
}

.pet-card[data-type="dog"]:hover {
  transform: scale(1.05) rotate(2deg);
  background: rgba(0, 255, 102, 0.28);
}

.vip-card::after {
  content: "VIP";
  position: absolute;
  top: 8px;
  right: 8px;
  background: red;
  color: #ffff00;
  padding: 6px 10px;
  border: 4px outset #ffff00;
  font-weight: bold;
  animation: blink 0.45s infinite;
}

/* pure CSS breed filter */
#devon:checked ~ .pet-grid .pet-card,
#british:checked ~ .pet-grid .pet-card,
#domestic-long:checked ~ .pet-grid .pet-card,
#domestic-short:checked ~ .pet-grid .pet-card,
#ragdoll:checked ~ .pet-grid .pet-card,
#tabby:checked ~ .pet-grid .pet-card,
#maine:checked ~ .pet-grid .pet-card,
#poodle:checked ~ .pet-grid .pet-card,
#pomeranian:checked ~ .pet-grid .pet-card,
#whippet:checked ~ .pet-grid .pet-card,
#miniature-dachshund:checked ~ .pet-grid .pet-card {
  display: none;
}

#all:checked ~ .pet-grid .pet-card {
  display: block;
}

#devon:checked ~ .pet-grid .devon {
  display: block;
}

#british:checked ~ .pet-grid .british {
  display: block;
}

#domestic-long:checked ~ .pet-grid .domestic-long {
  display: block;
}

#domestic-short:checked ~ .pet-grid .domestic-short {
  display: block;
}

#ragdoll:checked ~ .pet-grid .ragdoll {
  display: block;
}

#tabby:checked ~ .pet-grid .tabby {
  display: block;
}

#maine:checked ~ .pet-grid .maine {
  display: block;
}

/* ========= BREED FILTER ========= */

/* 隐藏全部 */
#devon:checked ~ .pet-grid .pet-card,
#british:checked ~ .pet-grid .pet-card,
#domestic-long:checked ~ .pet-grid .pet-card,
#domestic-short:checked ~ .pet-grid .pet-card,
#ragdoll:checked ~ .pet-grid .pet-card,
#tabby:checked ~ .pet-grid .pet-card,
#maine:checked ~ .pet-grid .pet-card,
#poodle:checked ~ .pet-grid .pet-card,
#pomeranian:checked ~ .pet-grid .pet-card,
#whippet:checked ~ .pet-grid .pet-card,
#miniature-dachshund:checked ~ .pet-grid .pet-card,
#snake:checked ~ .pet-grid .pet-card,
#rabbit:checked ~ .pet-grid .pet-card,
#parrot:checked ~ .pet-grid .pet-card,
#guinea-pig:checked ~ .pet-grid .pet-card {
  display: none;
}
 

/* ALL 显示全部 */
#all:checked ~ .pet-grid .pet-card {
  display: block;
}

/* 猫 */
#devon:checked ~ .pet-grid .devon { display: block; }
#british:checked ~ .pet-grid .british { display: block; }
#domestic-long:checked ~ .pet-grid .domestic-long { display: block; }
#domestic-short:checked ~ .pet-grid .domestic-short { display: block; }
#ragdoll:checked ~ .pet-grid .ragdoll { display: block; }
#tabby:checked ~ .pet-grid .tabby { display: block; }
#maine:checked ~ .pet-grid .maine { display: block; }

/* 狗 */
#poodle:checked ~ .pet-grid .poodle { display: block; }
#pomeranian:checked ~ .pet-grid .pomeranian { display: block; }
#whippet:checked ~ .pet-grid .whippet { display: block; }
#miniature-dachshund:checked ~ .pet-grid .miniature-dachshund { display: block; }
/* 其他宠物 */
#snake:checked ~ .pet-grid .snake { display: block; }
#rabbit:checked ~ .pet-grid .rabbit { display: block; }
#parrot:checked ~ .pet-grid .parrot { display: block; }
#guinea-pig:checked ~ .pet-grid .guinea-pig { display: block; }
.success-stories {
  margin: 50px 20px 40px;
  padding: 28px;
  border: 6px ridge #ffff00;
  background: rgba(255, 255, 255, 0.18);
  text-align: center;
}

.success-stories h2 {
  font-size: 42px;
  color: #ffff00;
  text-shadow: 3px 3px red;
  margin: 0;
}

.success-stories p {
  font-size: 20px;
  font-weight: bold;
}

.bottom-popup {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 100px;
  background: rgba(60, 60, 60, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 150px;
  padding-right: 80px;
  z-index: 9999;
  border-top: 4px ridge #ffff00;
}

.popup-image {
  position: absolute;
  left: 20px;
  bottom: 0;
}

.popup-image img {
  height: 130px;
  width: auto;
  display: block;
}

.popup-text {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
}

.small {
  font-size: 18px;
}

.highlight {
  color: #ffff00;
  text-shadow: 2px 2px red;
}

.popup-close {
  position: absolute;
  right: 18px;
  top: 10px;
  background: #ffff00;
  color: red;
  border: 3px outset white;
  font-weight: bold;
  padding: 4px 10px;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes shake {
  0% {
    transform: rotate(-2deg);
  }

  50% {
    transform: rotate(2deg);
  }

  100% {
    transform: rotate(-2deg);
  }
}

@media (max-width: 700px) {
  .header {
    flex-direction: column;
    gap: 12px;
  }

  .nav a,
  .nav label {
    margin: 0 8px;
    font-size: 17px;
  }

  .search-box h1 {
    font-size: 32px;
  }

  .bottom-popup {
    padding: 18px 50px 18px 18px;
  }

  .popup-image {
    display: none;
  }

  .popup-text {
    font-size: 18px;
  }


}