body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  background-attachment: fixed;
  color: #fff;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  min-height: 100vh;
}

/* Educational pattern overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
          /* Books and education elements */ radial-gradient(
      circle at 15% 25%,
      rgba(37, 99, 235, 0.1) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(244, 63, 94, 0.08) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 45% 15%,
      rgba(16, 185, 129, 0.06) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 75% 45%,
      rgba(245, 158, 11, 0.05) 0%,
      transparent 20%
    ),
    /* Subtle grid pattern for notebook effect */
      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 300px 300px, 250px 250px, 200px 200px, 180px 180px, 40px 40px,
    40px 40px;
  animation: educationalFloat 25s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes educationalFloat {
  0%,
  100% {
    transform: translateX(0px) translateY(0px);
  }
  25% {
    transform: translateX(10px) translateY(-15px);
  }
  50% {
    transform: translateX(-5px) translateY(-10px);
  }
  75% {
    transform: translateX(-10px) translateY(5px);
  }
}

.container {
  position: relative;
  z-index: 1;
}

.container h2 {
  text-align: center;
  color: #2563eb;
  font-weight: bold;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card {
  background-color: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h5 {
  color: #f43f5e;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.card p {
  color: #fff;
  font-size: 0.9rem;
  min-height: 10px;
}

.card .info {
  margin-top: 0px;
  font-size: 0.9rem;
  color: #2563eb;
}

.btn-primary,
.btn-outline-primary {
  border-radius: 6px;
  transition: 0.3s;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-outline-primary {
  color: #2563eb;
  border: 1px solid #2563eb;
}

.btn-outline-primary:hover {
  background-color: #2563eb;
  color: #fff;
}

.card-buttons {
  margin-top: 0px;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* حالت اولیه کارت‌ها (مخفی با شفافیت صفر و کمی پایین‌تر) */
.card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* وقتی کارت در دید کاربر قرار گرفت */
.card.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .card p {
    font-size: 0.85rem;
    min-height: auto;
  }
}
