
/* Reset + Base Styles */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #000;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

#background {
  width: 100%;
  min-height: 100vh;
  background-image: url('images/background01.png');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
}

/* Header Bar */
#site-header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #c9d0ff;
  text-align: center;
  font-family: 'Georgia', serif;
  z-index: 200;
}

#site-header a {
  color: #c9d0ff;
  text-decoration: underline;
}

/* Card Grid */
#card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  width: 90%;
  max-width: 700px;
  margin: 0 auto 40px;
}

.card-placeholder {
  width: 100%;
  aspect-ratio: 3 / 5;
  border: 2px solid #000;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  position: relative;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.placeholder-number {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #fff;
  color: blue;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 12px;
  z-index: 10;
}

/* Fade-in Animation for Drawn Cards */
@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card-placeholder.fade-in {
  animation: fadeInCard 0.6s ease-out;
}

/* Card Back Selection */
#card-selection {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 10px 0 30px 10px;
  max-width: 90%;
}

.card-back {
  width: 60px;
  height: 90px;
  background-color: #333;
  background-image: url('images/placeholder-card-back1.png');
  background-size: cover;
  background-position: center;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s;
  flex: 0 0 auto;
}

.card-back:hover {
  transform: translateY(-10px) scale(1.1);
  z-index: 10;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
}

/* Meaning Modal */
#card-meaning-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  max-height: 70%;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  z-index: 300;
  font-size: 16px;
  line-height: 1.5;
}

#card-meaning-modal.active {
  display: block;
}

/* Buttons */
.button-container {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 10px 0;
  position: sticky;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.button-container button {
  margin: 0 10px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #273bfa;
  color: #fff;
  transition: background-color 0.3s;
}

.button-container button:hover {
  background-color: #c8cdf9;
}

/* Responsive Tweak */
@media (max-width: 600px) {
  .card-placeholder {
    aspect-ratio: 2.5 / 4;
  }
  .button-container {
    flex-direction: column;
    gap: 10px;
  }
}
#instructions {
  max-width: 700px;
  width: 90%;
  margin: 20px auto;
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  border-radius: 8px;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}