body {
  margin: 0;
  font-family: 'Armata', sans-serif;
  background: radial-gradient(ellipse at top, #1a0933, #000000);
  color: #e8d8ff;
  text-align: center;
  padding-bottom: 80px;
}

header h1 {
  font-size: 2.6rem;
  font-family: 'DM Serif Display', serif;
  letter-spacing: 1px;
  text-shadow: 0 0 10px #ff4fd8;
}

/* TOP NAVIGATION LINKS */
.top-nav {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.top-nav a {
  color: #cfaaff;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 1px;
  opacity: 0.9;
  transition: opacity .2s ease, text-shadow .2s ease;
}

.top-nav a:hover {
  opacity: 1;
  text-shadow: 0 0 8px #ff9dff;
}

.controls button:hover {
  background: #ff4fd8;
  color: #000000;
  border-color: #ff4fd8;
}

/* DRAW BUTTONS */
.controls {
  margin-top: 20px;
}

.controls button {
  background: #000000;
  color: #ff4fd8;
  border: 3px solid #ff4fd8;
  padding: 14px 28px;
  margin: 10px;
  font-size: 1.2rem;
  font-family: 'Cinzel', serif;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all .2s ease;
}

.controls button:hover {
  background: #ff4fd8;
  color: #000000;
  border-color: #ff4fd8;
  box-shadow: 0 0 12px #ff4fd8;
}

#card-area {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.card {
  width: 180px;
  height: 280px; /* adjust if needed */
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 10px;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: block;
}

.history {
  margin-top: 40px;
}

#history-list {
  list-style: none;
  padding: 0;
}

#history-list li {
  margin: 10px 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

#modal.hidden {
  display: none;
}

#modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1c1130;
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  text-align: center;
  position: relative;
}

#modal-img {
  width: 100%;
  border-radius: 10px;
}

#close-modal {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-size: 1.5rem;
}

.card-number {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: #ffffffcc;
  text-shadow: 0 0 6px black;
  pointer-events: none;
}

/* Flip animation when card is clicked the first time */
/* 3D flip structure */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
}

.card-back {
  transform: rotateY(0deg);
}

.card-front {
  transform: rotateY(180deg);
}

/* card number overlay on the FRONT */
.card-number {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: #ffffffcc;
  text-shadow: 0 0 6px #000;
  z-index: 2;
  pointer-events: none;
}

.oracle-footer {
  margin: 40px auto 30px;
  padding: 12px 20px;
  max-width: 800px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #e8d8ff;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.oracle-footer span {
  opacity: 0.8;
}

.oracle-footer a {
  color: #ff88ff;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.oracle-footer a:hover {
  text-decoration: underline;
}

.discord-banner {
  max-width: 900px;
  margin: 40px auto 20px;
  padding: 14px 20px 18px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(255, 136, 255, 0.25), rgba(0, 0, 0, 0.6));
  border: 1px solid rgba(255, 136, 255, 0.4);
  text-align: center;
}

.discord-banner p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.discord-banner a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid #ff88ff;
  color: #ffccff;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.discord-banner a:hover {
  background: #ff88ff;
  color: #160020;
  box-shadow: 0 0 14px #ff88ff;
}

