/* === Fortune Card additions === */

.fortune-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3 / 2;
  margin: 1.5rem auto 1.5rem;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff1e6 100%);
  border: 3px solid var(--pick-border);
  box-shadow: 0 10px 40px rgba(255, 107, 157, 0.2);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.fortune-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-dark);
}

.layer-stack {
  position: absolute;
  inset: 0;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.45s ease;
}

.layer-stack[data-hand="right"] .layer {
  cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3E%3Cline%20x1='8'%20y1='8'%20x2='32'%20y2='32'%20stroke='white'%20stroke-width='9'%20stroke-linecap='round'/%3E%3Cline%20x1='8'%20y1='8'%20x2='32'%20y2='32'%20stroke='%23111'%20stroke-width='5'%20stroke-linecap='round'/%3E%3C/svg%3E") 20 20, crosshair;
}

.layer-stack[data-hand="left"] .layer {
  cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3E%3Cline%20x1='8'%20y1='32'%20x2='32'%20y2='8'%20stroke='white'%20stroke-width='9'%20stroke-linecap='round'/%3E%3Cline%20x1='8'%20y1='32'%20x2='32'%20y2='8'%20stroke='%23111'%20stroke-width='5'%20stroke-linecap='round'/%3E%3C/svg%3E") 20 20, crosshair;
}

.hand-toggle {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin: 0.5rem 0 1rem;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  color: var(--muted);
}

.hand-toggle label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

@keyframes layerIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.layer.fresh {
  animation: layerIn 0.35s ease both;
}

/* Restyle the New fortune button to echo the card's design */
#new-fortune {
  display: block;
  width: auto;
  max-width: 280px;
  margin: 0.5rem auto 0;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  background: var(--card);
  color: var(--primary-dark);
  border: 2px solid var(--pick-border);
  box-shadow: 0 4px 14px rgba(255, 107, 157, 0.18);
}

#new-fortune:hover {
  background: var(--pick-bg);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.28);
}

@media (max-width: 500px) {
  .fortune-text { font-size: 1.4rem; padding: 1rem 1.25rem; }
}
