* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: #0a0a1a;
  color: #e0d0c0;
  font-family: 'Georgia', serif;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.container {
  max-width: 520px;
  width: 100%;
  text-align: center;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 32px;
  color: #c8a86e;
  text-shadow: 0 0 20px rgba(200, 168, 110, 0.3);
}

/* Mode switch */
.mode-switch {
  display: inline-flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 36px;
  background: #141428;
  border-radius: 12px;
  padding: 4px;
}

.mode-btn {
  padding: 10px 32px;
  border: none;
  background: transparent;
  color: #706050;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s;
}

.mode-btn.active {
  background: #1e1e3a;
  color: #c8a86e;
  box-shadow: 0 0 12px rgba(200, 168, 110, 0.15);
}

.mode-btn:hover:not(.active) {
  color: #a09080;
}

/* Sections */
.section {
  animation: fadeIn 0.3s ease;
}

.hidden {
  display: none !important;
}

.hint {
  color: #706050;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ===== CARD FLIP ===== */
.card-wrapper {
  width: 200px;
  height: 300px;
  margin: 0 auto 28px;
  cursor: pointer;
  perspective: 800px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

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

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  border: 2px solid #c8a86e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Back */
.card-back {
  background: linear-gradient(145deg, #1a1a3a, #12122a);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.card-back-ornament {
  width: 140px;
  height: 220px;
  border: 1px solid rgba(200, 168, 110, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(200, 168, 110, 0.03) 10px,
    rgba(200, 168, 110, 0.03) 20px
  );
}

.card-back-symbol {
  font-size: 3.5rem;
  color: #c8a86e;
  opacity: 0.4;
}

.card-wrapper:hover .card:not(.flipped) {
  transform: translateY(-4px) rotateY(5deg);
}

.card-wrapper:hover .card.flipped {
  transform: rotateY(180deg) translateY(-4px);
}

/* Front */
.card-front {
  background: linear-gradient(160deg, #1e1538, #0e0a20, #1a1230);
  transform: rotateY(180deg);
  padding: 16px;
  gap: 4px;
  box-shadow: 0 4px 32px rgba(100, 70, 180, 0.2);
}

.card-numeral {
  font-size: 0.85rem;
  color: #8a7ab0;
  letter-spacing: 3px;
}

.card-symbol {
  font-size: 3.5rem;
  margin: 8px 0;
  line-height: 1;
}

.card-title {
  font-size: 1.05rem;
  color: #c8a86e;
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
}

.card-front.reversed .card-symbol {
  transform: rotate(180deg);
}

.card-front .reversed-label {
  font-size: 0.7rem;
  color: #a06050;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ===== RESULT ===== */
.result {
  background: linear-gradient(145deg, #141428, #0e0e20);
  border: 1px solid #2a2a4a;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: left;
  animation: slideUp 0.4s ease;
}

.result-name {
  text-align: center;
  font-size: 1.3rem;
  color: #a78443;
  margin-bottom: 12px;
  font-weight: bold;
}

.result-meaning {
  line-height: 1.7;
  color: #b0a090;
  font-size: 1.2rem;
}

/* ===== RUNES ===== */
.throw-btn {
  padding: 14px 40px;
  background: linear-gradient(145deg, #1e1e3a, #14142a);
  border: 2px solid #c8a86e;
  color: #c8a86e;
  font-family: inherit;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 28px;
}

.throw-btn:hover {
  background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
  box-shadow: 0 0 20px rgba(200, 168, 110, 0.2);
  transform: translateY(-2px);
}

.throw-btn:active {
  transform: scale(0.97);
}

.rune-stones {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.rune-stone {
  width: 70px;
  height: 85px;
  background: linear-gradient(145deg, #2a2a3a, #1a1a2a);
  border: 1px solid #3a3a5a;
  border-radius: 8px 8px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #c8a86e;
  animation: dropIn 0.5s ease backwards;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.rune-stone:nth-child(2) { animation-delay: 0.15s; }
.rune-stone:nth-child(3) { animation-delay: 0.3s; }

.rune-divider {
  border: none;
  border-top: 1px solid #2a2a4a;
  margin: 16px 0;
}

.reversed-badge {
  text-align: center;
  font-size: 0.75rem;
  color: #a06050;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-30px) rotate(10deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
