:root {
  --sky1: #a0c4ff;
  --sky2: #c7f9cc;
  --sun: #ffd166;
  --ground: #90be6d;
  --soil: #6c584c;
  --stem: #3a5a40;
  --leaf1: #52b788;
  --leaf2: #2a9d8f;
  --petal1: #ffafcc;
  --petal2: #ffd6a5;
  --petal3: #bdbefe;
  --text: #1e1e1e;
  --muted: #475569;
  --card-bg: rgba(255, 255, 255, 0.75);
  --shadow: 0 10px 26px rgba(0, 0, 0, .2);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito Sans', sans-serif;
  background: linear-gradient(to top, var(--sky2) 0%, var(--sky1) 60%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* HEADER */
header {
  position: relative;
  text-align: center;
  padding: 40px 16px 80px;
}

header h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(90deg, #2d97d4, #2224c5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header p {
  margin-top: 8px;
  opacity: .85;
}

/* Matahari dan awan */
.sun {
  position: absolute;
  right: 6vw;
  top: 24px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7dd 0%, var(--sun) 60%, #ffb703 100%);
  box-shadow: 0 0 60px #ffd166aa;
  animation: floatY 8s ease-in-out infinite alternate;
}

.cloud {
  position: absolute;
  width: 140px;
  height: 50px;
  background: #fff;
  border-radius: 50px;
  box-shadow:
    20px 0 0 10px #fff,
    50px -5px 0 15px #fff,
    80px 0 0 10px #fff,
    110px 5px 0 8px #fff;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  opacity: 0.95;
  animation: cloudDrift 100s linear infinite;
}

.cloud.front {
  opacity: 0.9;
  filter: blur(2px);
  animation-duration: 90s;
}

.cloud.middle {
  opacity: 0.7;
  filter: blur(4px);
  animation-duration: 130s;
}

.cloud.back {
  opacity: 0.5;
  filter: blur(6px);
  animation-duration: 180s;
}


.cloud:nth-child(1) {
  left: -20vw;
  animation-delay: 0s;
}

.cloud:nth-child(2) {
  left: -60vw;
  top: 120px;
  transform: scale(.9);
  animation-duration: 120s;
}

.cloud:nth-child(3) {
  left: -80vw;
  top: 160px;
  opacity: .7;
  animation-duration: 140s;
}

@keyframes floatY {
  0% {
    transform: translateY(-8px)
  }

  100% {
    transform: translateY(8px)
  }
}

@keyframes cloudDrift {
  0% {
    transform: translateX(-20vw)
  }

  100% {
    transform: translateX(240vw)
  }
}

/* GROUND */
.ground {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;
  background: linear-gradient(to top, var(--soil) 0, #7f6a5a 20%, transparent 21%),
    linear-gradient(to top, var(--ground) 0%, #a9d68f 70%);
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  box-shadow: 0 -12px 30px #00000020 inset;
  z-index: 0;
}

/* FLOWER */
.flower {
  position: fixed;
  bottom: 0;
  width: 50px;
  height: 150px;
  transform-origin: 50% 100%;
  animation: swing 6s ease-in-out infinite alternate;
}

.flower .stem {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6px;
  height: 100px;
  background: var(--stem);
  transform: translateX(-50%);
  border-radius: 3px;
}

.flower .leaf {
  position: absolute;
  width: 30px;
  height: 18px;
  border-radius: 50% 50% 0 50%;
  background: var(--leaf1);
  top: 60px;
  left: -28px;
  transform: rotate(-20deg);
}

.flower .leaf2 {
  position: absolute;
  width: 30px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--leaf2);
  top: 80px;
  right: -28px;
  transform: rotate(20deg);
}

.flower .petal {
  position: absolute;
  width: 20px;
  height: 40px;
  border-radius: 10px;
  background: var(--petal1);
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: center bottom;
}

.flower div.petal:nth-of-type(4) {
  transform: translateX(-50%) rotate(0deg);
  background: var(--petal1);
}

.flower div.petal:nth-of-type(5) {
  transform: translateX(-50%) rotate(60deg);
  background: var(--petal2);
}

.flower div.petal:nth-of-type(6) {
  transform: translateX(-50%) rotate(120deg);
  background: var(--petal3);
}

.flower div.petal:nth-of-type(7) {
  transform: translateX(-50%) rotate(180deg);
  background: var(--petal1);
}

.flower div.petal:nth-of-type(8) {
  transform: translateX(-50%) rotate(240deg);
  background: var(--petal2);
}

.flower div.petal:nth-of-type(9) {
  transform: translateX(-50%) rotate(300deg);
  background: var(--petal3);
}

.flower .center {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffd166;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

@keyframes swing {
  0% {
    transform: rotate(-1.5deg)
  }

  50% {
    transform: rotate(1.5deg)
  }

  100% {
    transform: rotate(-1.5deg)
  }
}

/* CARD */
main {
  position: relative;
  z-index: 5;
  margin-top: -60px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px;
  padding-bottom: 280px;
}

.card {
  width: 280px;
  min-height: 340px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: .25s ease;
  backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  margin: 0;
}

.card p {
  font-size: .9rem;
  color: var(--muted);
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  font-size: .75rem;
  padding: 4px 9px;
  border-radius: 9999px;
  background: #dce4fc;
  color: #162365;
}

button.btn {
  margin-top: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #4facfe, #43e97b);
  color: #ffffff;
  font-weight: 600;
  transition: .2s;
}

button.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  background: linear-gradient(90deg, #43e97b, #4facfe);
  box-shadow: 0 4px 10px rgba(79, 172, 254, 0.3);
}

/* FOOTER */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: rgba(11, 61, 46, 0.9);
  color: #d1fae5;
  text-align: center;
  line-height: 40px;
  font-size: 0.9rem;
  border-top: 2px solid #22c55e40;
  z-index: 9999;
}

@media(max-width:720px) {
  .card {
    width: 90%
  }
}

#searchBox {
  margin-top: 20px;
  padding: 10px 16px;
  width: clamp(200px, 50%, 360px);
  border-radius: 9999px;
  border: none;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  outline: none;
  text-align: center;
  font-family: 'Nunito Sans', sans-serif;
  transition: all 0.2s ease;
}

#searchBox:focus {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transform: scale(1.02);
}