@font-face {
  font-family: "American";
  src: url("American-Captain.woff") format("woff"); /* Perbaikan: Gunakan quotes untuk URL */
}
body {
  background: linear-gradient(to left, #833ab4, #fd1d1d, #fc45da);
  background-size: 400% 400%;
  animation: animate-background 10s infinite ease-in-out;
  font: 18px "American", "Arial", arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-height: 100%;
  align-content: 100%;
  flex-direction: column;
}
@keyframes animate-background {
  0% {
    background-position: 0 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}
h1 {
  /* font: 18px/36px "American", "Arial", arial, sans-serif; */
  text-align: center;
  font-size: 8rem;
  margin-top: 3rem;
  color: #fff;
  /* color: linear-gradient(to right, #fd1d1d, #833ab4); */
}

.gallery {
  display: flex;
  gap: 20px;
  /* flex-wrap: wrap; */
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

.gallery a {
  width: 120px;
  height: 120px;
  overflow: hidden;
  display: inline;
  border-radius: 80px;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: #833ab4;
}

.gallery img.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover {
  transition: 0.9s;
  opacity: 0.5;
}

@keyframes zoomFade {
  0% {
    transform: rotateY(-90deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(3600deg);
    opacity: 1;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Overlay styling */
.overlay {
  position: fixed;
  max-width: 0;
  max-height: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

.overlay a {
  position: absolute;
  top: 30px;
  left: 50%;
  font-size: 32px;
  color: white;
  border-color: black;
  text-decoration: none;
}

.overlay img.full-thumb {
  max-width: 70%;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

/* Ini untuk mentarget id dari element html enggunakan css */
.overlay:target {
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  animation: fadeIn 1s;
}

.overlay:target .full-thumb {
  animation: zoomFade 1s;
}

/* ===================================== TRY CARD FLIP -------------------- */
/* Container untuk semua kartu agar bisa diatur layoutnya */
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 150px;
}

/* --- Struktur Dasar Kartu 3D --- */
.card {
  width: 80%;
  height: 80%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

/* Ketika kartu di-hover, putar 180 derajat di sumbu Y */
.card:hover {
  transform: rotateY(180deg); /* Kunci untuk flip sempurna */
}

/* --- Sisi Depan dan Belakang Kartu --- */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Menyembunyikan sisi yang tidak menghadap pengguna */
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
}

/* Sisi Depan */
.card-front {
  background-color: #eee;
  z-index: 2;
  transform: rotateY(0deg); /* Sisi depan awalnya menghadap ke depan */
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sisi Belakang */
.card-back {
  background-color: #eee; /* Sesuaikan warna latar belakang jika ada transparansi */
  /* Kunci untuk flip gambar yang sama */
  transform: rotateY(180deg); /* Sisi belakang diputar 180 derajat agar terlihat terbalik */
}

.card-back p {
  font-size: 22px;
  font-family: "Times New Roman", Times, serif;
  padding: 20px 10rem;
}

/* Jika Anda ingin rotasi vertikal (flip dari atas ke bawah)
kURANG BUAT RENSPOIVE LAYUTNYA  */
/* Ganti .card:hover transform menjadi rotateX(180deg); */
/* Ganti .card-back transform menjadi rotateX(180deg); */
/* Ganti .card-front transform menjadi rotateX(0deg); */
