@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

:root {
  --card-bg: rgba(0, 0, 0, 0.6);
  --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150vh;
  background: #d0d2e5;
  font-family: "Roboto", sans-serif;
  padding: 20px;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.card {
  position: relative;
  height: 300px;
  border: solid 5px white;
  border-radius: 15px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 50, 0.7))
    drop-shadow(2px 4px 3px rgba(0, 0, 0, 0.5));
  animation: fadeIn 0.6s ease-out forwards;
}

.card:nth-child(2) {
  animation-delay: 0.2s;
}
.card:nth-child(3) {
  animation-delay: 0.4s;
}
.card:nth-child(4) {
  animation-delay: 0.6s;
}
.card:nth-child(5) {
  animation-delay: 0.8s;
}
.card:nth-child(6) {
  animation-delay: 1s;
}
.card:nth-child(7) {
  animation-delay: 1.2s;
}
.card:nth-child(8) {
  animation-delay: 1.4s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  z-index: 1;
  filter: url(#turb);
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  color: white;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.card p {
  color: #f0f0f0;
  line-height: 1.1;
  font-size: 0.8rem;
}

.refresh-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: solid 2px black;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  transition: background 0.3s ease;
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 50, 0.7))
    drop-shadow(2px 4px 3px rgba(0, 0, 0, 0.5));
}

.refresh-btn:hover {
  background: #0056b3;
}
a {
    position: fixed;
    top: 20px;
    left: 20px;
    border-radius: 14px;
    cursor: pointer;
    filter: drop-shadow(1px 2px 1px rgba(9, 9, 195, 0.7))
      drop-shadow(2px 4px 3px rgba(0, 0, 0, 0.5));
  }
  a:hover {
    background: #b30000;
  }

.card:hover {
  box-shadow: 0 0 25px 5px rgba(0, 0, 0, 0.5);
}

.card-container:hover > :not(:hover) {
  filter: url(#colorCycle);
  transition: filter 0.3s ease, background-color 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(20px) rotateZ(10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0) rotateZ(0);
  }
}