/* ===== RESULTS PAGE STYLES ===== */

/* ===== GACHA / BLIND BOX ===== */
.gacha-section {
  text-align: center;
  padding: 2rem 1.25rem;
  max-width: 400px;
  margin: 0 auto;
}

.gacha-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.gacha-machine {
  position: relative;
  width: 200px;
  height: 220px;
  margin: 0 auto 1.5rem;
}

/* Blind box - image based */
.gacha-box-img {
  display: block;
  width: 220px;
  height: auto;
  margin: 0 auto;
  cursor: pointer;
  border-radius: 16px;
  animation: idleWiggle 2.5s ease-in-out infinite;
  transition: transform 0.3s;
}

.gacha-box-img:hover {
  transform: scale(1.05);
}

.gacha-box-img.shaking {
  animation: boxShake 0.5s ease-in-out !important;
}

@keyframes idleWiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-2deg); }
  40% { transform: rotate(2.5deg); }
  60% { transform: rotate(-1.5deg); }
  80% { transform: rotate(1deg); }
}

.gacha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.1rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(124,58,237,0.3);
}

.gacha-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(124,58,237,0.4);
}

.gacha-btn:active { transform: scale(0.97); }

.gacha-btn.spinning .gacha-btn-icon {
  display: inline-block;
  animation: spinIcon 0.6s ease-in-out;
}

.gacha-btn.done { display: none; }

/* Character reveal */
.gacha-reveal {
  margin-top: 1.5rem;
}

.result-character-showcase {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid var(--accent2, #7c5cfc);
  box-shadow: 0 8px 30px rgba(124,58,237,0.25);
  animation: showcasePop 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.result-character-display {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keyframes */
@keyframes qmarkFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes boxShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-6px) rotate(-3deg); }
  30% { transform: translateX(6px) rotate(3deg); }
  45% { transform: translateX(-4px) rotate(-2deg); }
  60% { transform: translateX(4px) rotate(2deg); }
  75% { transform: translateX(-2px) rotate(-1deg); }
}

@keyframes spinIcon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes showcasePop {
  0% { opacity: 0; transform: scale(0.3) translateY(40px); }
  60% { transform: scale(1.08) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.results-hero {
  text-align: center;
  padding: 2.5rem 1.25rem 1.5rem;
  max-width: 600px; margin: 0 auto;
}

.result-type-code {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--accent2);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.result-nickname {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.result-tagline {
  font-size: 0.92rem;
  color: var(--dim);
  font-style: italic;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Dimensions section */
.results-dimensions {
  max-width: 500px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}
.results-dimensions h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
}

/* Share card section */
.results-share {
  text-align: center;
  padding: 2rem 1.25rem;
  max-width: 600px; margin: 0 auto;
}
.results-share h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.share-card-preview {
  margin: 1.5rem auto;
}
.share-btns {
  display: flex; gap: 0.75rem;
  justify-content: center; flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Soul message section */
.results-soul {
  max-width: 560px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  display: none;
}

/* Overview section */
.results-overview {
  max-width: 560px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}
.results-overview h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.results-overview p {
  font-size: 0.95rem;
  color: var(--dim);
  line-height: 1.8;
}

/* CTA section */
.results-ctas {
  max-width: 500px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  display: flex; flex-direction: column;
  gap: 0.75rem;
}
.results-cta-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: all 0.2s;
}
.results-cta-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124,92,252,0.1);
}
.results-cta-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.results-cta-text {
  flex: 1;
}
.results-cta-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}
.results-cta-text span {
  font-size: 0.8rem;
  color: var(--dim);
}
.results-cta-arrow {
  color: var(--muted);
  font-size: 1.2rem;
}

/* Retake */
.results-retake {
  text-align: center;
  padding: 1rem 1.25rem 2rem;
}

@media (min-width: 768px) {
  .result-type-code { font-size: 5.5rem; }
  .result-nickname { font-size: 1.8rem; }
}
