/* Mystical tarot theme layout and animations */

:root {
  --gold: #ffd700;
  --garnet: #8b0000;
  --ink: #0a0a0c;
  --parchment: #f9edd7f7;
  --indigo: #1c1b3a;
}

body {
  background: radial-gradient(1200px 600px at 50% 0%, #121019 0%, #07060b 60%, #030307 100%);
}

.app-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.app-header {
  text-align: center;
  padding: 24px 16px 8px;
  color: var(--gold);
}
.app-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.app-header img {
  width: 36px;
  height: 36px;
}
.app-header h1 {
  margin: 0;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
}
.app-header .subtitle {
  color: #d9c07c;
  margin-top: 6px;
  font-family: 'Roboto', sans-serif;
}

.app-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}

.controls {
  background: linear-gradient(180deg, rgba(34,25,44,0.8), rgba(15,12,24,0.6));
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
}
.mode-picker {
  display: flex;
  gap: 16px;
  color: var(--gold);
  font-family: 'Roboto', sans-serif;
}
.mode-picker input { margin-right: 6px; }

textarea#question {
  width: 100%;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: var(--parchment);
  color: #1d1b18;
  padding: 12px 14px;
}

.buttons { display: flex; gap: 12px; margin-top: 10px; }
.btn {
  border-radius: 24px;
  border: 2px solid var(--gold);
  padding: 10px 18px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn.primary { background: var(--garnet); color: var(--gold); }
.btn.accent { background: transparent; color: var(--gold); }
.btn:hover { transform: translateY(-1px); background: var(--gold); color: var(--garnet); }

.deck-area { position: relative; height: 220px; margin-top: 26px; }
.deck { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 140px; height: 200px; }
.card-back {
  position: absolute; width: 140px; height: 200px; border-radius: 10px;
  background: radial-gradient(120px 140px at 50% 40%, #2d2951, #16132b);
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 12px 25px rgba(0,0,0,0.6);
}

.split-area { position: absolute; left: 50%; transform: translateX(-50%); top: 0; width: 100%; height: 100%; display: flex; justify-content: space-between; pointer-events: none; }
.split-area .stack { width: 45%; height: 100%; position: relative; }
.split-area .stack .card-back { left: 50%; transform: translateX(-50%); }

.results { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.reading-card { background: var(--parchment); color: #221e17; border-radius: 14px; padding: 14px; box-shadow: 0 10px 26px rgba(0,0,0,0.35); border: 1px solid rgba(0,0,0,0.08); }
.reading-card h3 { margin: 0 0 6px 0; font-family: 'Cinzel', serif; color: #4b2f2f; }
.reading-card .position { color: #6b5c35; font-size: 13px; margin-bottom: 6px; font-family: 'Roboto', sans-serif; }
.reading-card img { width: 100%; border-radius: 12px; display: block; margin: 10px 0; }
.reading-card .interpretation { white-space: pre-wrap; font-family: 'Roboto', sans-serif; line-height: 1.55; }

.history { margin-top: 28px; }
.history h2 { color: var(--gold); font-family: 'Cinzel', serif; margin: 0 0 12px 0; }
.history-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.history-item { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,215,0,0.18); border-radius: 12px; padding: 10px; color: #e7dac0; }
.history-item .meta { font-size: 12px; opacity: 0.8; }

.app-footer { text-align: center; color: #b9a56a; padding: 24px 12px; font-family: 'Roboto', sans-serif; }

/* Cleaner, more horizontal shuffle animations */
@keyframes shuffleLeft {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(calc(-50% - 160px), -50%) rotate(-2deg); }
}
@keyframes shuffleRight {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(calc(-50% + 160px), -50%) rotate(2deg); }
}

.animate-left { animation: shuffleLeft 420ms ease-out forwards; }
.animate-right { animation: shuffleRight 420ms ease-out forwards; }


