* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: #1A0A2E;
  color: #F5F0EB;
  user-select: none;
  -webkit-user-select: none;
}

.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page.active {
  display: flex;
}

/* ====== Loading Page ====== */
#page-loading {
  background: linear-gradient(135deg, #1A0A2E, #2D1B4E);
  justify-content: center;
  gap: 20px;
}

.loading-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 0;
}

#page-loading > *:not(.loading-bg) {
  position: relative;
  z-index: 1;
}

.symbols-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.loading-symbol {
  position: absolute;
  font-size: 40px;
  opacity: 0.4;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.loading-symbol.s1 {
  top: 12%;
  left: 15%;
  animation: floatSymbol1 6s ease-in-out infinite;
}

.loading-symbol.s2 {
  top: 20%;
  right: 12%;
  animation: floatSymbol2 8s ease-in-out infinite;
}

.loading-symbol.s3 {
  bottom: 15%;
  right: 20%;
  animation: floatSymbol3 7s ease-in-out infinite;
}

@keyframes floatSymbol1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(20px, -15px) rotate(10deg); }
  66% { transform: translate(-10px, 10px) rotate(-5deg); }
}

@keyframes floatSymbol2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-15px, -20px) rotate(-8deg); }
  66% { transform: translate(10px, 5px) rotate(5deg); }
}

@keyframes floatSymbol3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(15px, 10px) rotate(12deg); }
  66% { transform: translate(-20px, -10px) rotate(-6deg); }
}

.astrolabe {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, 0.4);
  position: relative;
  animation: spin 4s linear infinite;
  margin-bottom: 10px;
}

.astrolabe-inner {
  position: absolute;
  top: 10px; left: 10px;
  right: 10px; bottom: 10px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.25);
}

.astrolabe-inner::before, .astrolabe-inner::after {
  content: '';
  position: absolute;
  background: rgba(212, 175, 55, 0.15);
}

.astrolabe-inner::before {
  top: 50%; left: 5%;
  width: 90%; height: 1px;
}

.astrolabe-inner::after {
  left: 50%; top: 5%;
  height: 90%; width: 1px;
}

.astrolabe-center {
  position: absolute;
  top: 50%; left: 50%;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  background: radial-gradient(circle, rgba(212,175,55,0.6), transparent);
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.astrolabe-glow {
  position: absolute;
  top: -20px; left: -20px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 30%, rgba(212,175,55,0.08) 60%, transparent 80%);
  animation: glowSweep 2s ease-in-out infinite;
}

@keyframes glowSweep {
  0% { transform: rotate(0deg) scale(1); opacity: 0.5; }
  50% { transform: rotate(180deg) scale(1.2); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.5; }
}

.stars-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.star-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #D4AF37;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #F5F0EB;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  letter-spacing: 1px;
  min-height: 30px;
  text-align: center;
  padding: 0 20px;
}

.progress-bar-container {
  width: 260px;
  height: 4px;
  background: rgba(245, 240, 235, 0.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D4AF37, #E8B4B8, #D4AF37);
  background-size: 200% 100%;
  border-radius: 2px;
  animation: shimmer 1.5s linear infinite;
  transition: width 0.3s ease;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ====== Quiz Page ====== */
#page-quiz {
  background: linear-gradient(135deg, #8B7BBE, #F5EDE0);
}

.quiz-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.quiz-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  max-width: 420px;
  margin: 0 auto;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  margin-bottom: 12px;
}

.quiz-number {
  font-size: 13px;
  color: #8B7BBE;
  font-weight: 500;
}

.quiz-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  margin: 0 12px;
  opacity: 0.3;
}

.quiz-type-indicator {
  font-size: 12px;
  color: #8B7BBE;
  padding: 2px 10px;
  border: 1px solid rgba(139, 123, 190, 0.3);
  border-radius: 12px;
}

.quiz-card {
  background: rgba(245, 237, 224, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.quiz-question {
  font-size: 17px;
  font-weight: 600;
  color: #2D1B4E;
  line-height: 1.5;
  text-align: center;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}

.quiz-option {
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(139, 123, 190, 0.25);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  font-size: 14px;
  color: #2D1B4E;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  word-break: break-all;
  line-height: 1.4;
}

.quiz-option:active {
  transform: scale(0.95);
  background: rgba(212, 175, 55, 0.1);
}

.quiz-option.selected {
  background: rgba(212, 175, 55, 0.15);
  border-color: #D4AF37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.quiz-option.correct-highlight {
  border-color: #D4AF37;
  background: rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.quiz-hint {
  text-align: center;
  font-size: 12px;
  color: rgba(139, 123, 190, 0.7);
  padding: 12px 0 8px;
  letter-spacing: 0.5px;
}

/* ====== Result Card Page ====== */
#page-result {
  background: #1A0A2E;
  overflow: hidden;
}

.result-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.card-container {
  position: relative;
  width: 290px;
  height: 400px;
  perspective: 1200px;
  z-index: 2;
}

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

.tarot-card.flipping {
  animation: cardFlip 2.2s ease-in-out forwards;
}

@keyframes cardFlip {
  0% {
    transform: rotateY(0deg) scale(0.3);
    opacity: 0;
  }
  15% {
    transform: rotateY(0deg) scale(1.05);
    opacity: 1;
  }
  22% {
    transform: rotateY(0deg) scale(1);
  }
  30% {
    transform: rotateY(90deg) scale(0.95);
  }
  40% {
    transform: rotateY(90deg) scale(0.95);
    filter: brightness(1.8);
  }
  55% {
    transform: rotateY(180deg) scale(0.98);
  }
  70% {
    transform: rotateY(270deg) scale(0.95);
  }
  85% {
    transform: rotateY(340deg) scale(1.02);
  }
  100% {
    transform: rotateY(360deg) scale(1);
    opacity: 1;
  }
}

.card-front, .card-back {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  border: 2px solid #D4AF37;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
  overflow: hidden;
}

.card-back {
  background: linear-gradient(135deg, #1A0A2E, #2D1B4E);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotateY(0deg);
}

.card-back-inner {
  width: 85%;
  height: 90%;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.card-back-icon {
  font-size: 48px;
  opacity: 0.6;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

.card-back-text {
  font-size: 14px;
  color: rgba(212, 175, 55, 0.5);
  letter-spacing: 3px;
}

.card-front {
  background: linear-gradient(135deg, #2D1B4E, #1A0A2E);
  background-size: cover;
  background-position: center;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.card-front.hidden-type {
  border-color: #FF6EC7;
  box-shadow: 0 0 40px rgba(255, 110, 199, 0.5), 0 0 80px rgba(255, 110, 199, 0.2);
  animation: rainbowBorder 3s linear infinite;
}

@keyframes rainbowBorder {
  0% { border-color: #FF6EC7; box-shadow: 0 0 30px rgba(255, 110, 199, 0.4); }
  25% { border-color: #FFD700; box-shadow: 0 0 30px rgba(255, 215, 0, 0.4); }
  50% { border-color: #00FFAA; box-shadow: 0 0 30px rgba(0, 255, 170, 0.4); }
  75% { border-color: #6EC7FF; box-shadow: 0 0 30px rgba(110, 199, 255, 0.4); }
  100% { border-color: #FF6EC7; box-shadow: 0 0 30px rgba(255, 110, 199, 0.4); }
}

.card-emoji {
  font-size: 56px;
  margin-bottom: 4px;
}

.card-personality-name {
  font-size: 22px;
  font-weight: 700;
  color: #D4AF37;
  letter-spacing: 2px;
}

.card-personality-title {
  font-size: 14px;
  color: #E8B4B8;
  margin-bottom: 4px;
  opacity: 0.8;
}

.card-personality-desc {
  font-size: 13px;
  color: #F5F0EB;
  text-align: center;
  line-height: 1.5;
  opacity: 0.7;
  padding: 0 8px;
}

.card-slogan {
  font-size: 11px;
  color: #D4AF37;
  text-align: center;
  line-height: 1.4;
  font-style: italic;
  opacity: 0.6;
  margin-top: 4px;
  padding: 0 4px;
}

.card-glow-ring {
  position: absolute;
  top: -10px; left: -10px;
  right: -10px; bottom: -10px;
  border-radius: 22px;
  border: 2px solid transparent;
  pointer-events: none;
}

.light-burst {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.8), transparent);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}

.light-burst.active {
  animation: burst 0.6s ease-out forwards;
}

@keyframes burst {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(50); opacity: 0; }
}

.hidden-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #FF6EC7, #FFD700);
  color: #1A0A2E;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: 1px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ====== Poster/Report Page ====== */
#page-poster {
  background: linear-gradient(135deg, #2D1B4E, #8B7BBE);
  justify-content: flex-start;
  padding-top: 0;
}

.poster-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.poster-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.poster-scroll::-webkit-scrollbar {
  width: 0;
}

.poster-content {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

.poster-header {
  text-align: center;
  margin-bottom: 16px;
}

.poster-title-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 6px;
}

.poster-title {
  font-size: 20px;
  font-weight: 700;
  color: #D4AF37;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.poster-subtitle {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.7);
  margin-top: 4px;
}

.poster-card {
  background: rgba(245, 237, 224, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.poster-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #D4AF37;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-align: center;
}

.poster-personality {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}

.poster-personality .card-emoji {
  font-size: 48px;
}

.poster-personality .card-personality-name {
  font-size: 20px;
}

.poster-personality .card-personality-title {
  font-size: 13px;
}

.poster-personality .card-slogan {
  font-size: 12px;
  margin-top: 8px;
}

.keywords-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0 4px;
}

.keyword-tag {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  color: #D4AF37;
}

.radar-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.radar-chart {
  width: 240px;
  height: 240px;
  position: relative;
}

.radar-svg {
  width: 100%;
  height: 100%;
}

.poster-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
  position: relative;
  z-index: 2;
}

.btn-primary {
  background: linear-gradient(135deg, #D4AF37, #C9A032);
  color: #1A0A2E;
  border: none;
  border-radius: 28px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.btn-secondary {
  background: rgba(245, 240, 235, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 28px;
  padding: 14px 24px;
  font-size: 15px;
  color: #F5F0EB;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  letter-spacing: 1px;
}

.btn-secondary:active {
  transform: scale(0.96);
  background: rgba(245, 240, 235, 0.15);
}

.btn-text {
  background: none;
  border: none;
  color: #E8B4B8;
  font-size: 13px;
  cursor: pointer;
  padding: 10px;
  transition: opacity 0.2s;
  text-align: center;
  letter-spacing: 1px;
}

.btn-text:active {
  opacity: 0.7;
}

.poster-watermark {
  text-align: center;
  font-size: 11px;
  color: rgba(245, 240, 235, 0.3);
  padding: 16px 0 8px;
  letter-spacing: 1px;
}

/* ====== Easter Egg Page ====== */
#page-egg {
  background: linear-gradient(135deg, #1A0A2E, #0D0520);
}

.egg-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.egg-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.halo-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 30px;
}

.halo-ring {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.3);
  animation: haloPulse 3s ease-in-out infinite;
}

.halo-ring:nth-child(2) {
  top: -15px; left: -15px;
  width: 230px; height: 230px;
  border-color: rgba(212, 175, 55, 0.15);
  animation-delay: 0.5s;
}

.halo-ring:nth-child(3) {
  top: 15px; left: 15px;
  width: 170px; height: 170px;
  border-color: rgba(212, 175, 55, 0.2);
  animation-delay: 1s;
}

@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
}

.halo-center {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.3), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  animation: floatCenter 4s ease-in-out infinite;
}

@keyframes floatCenter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.egg-title {
  font-size: 22px;
  font-weight: 700;
  color: #D4AF37;
  letter-spacing: 3px;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
  margin-bottom: 8px;
}

.egg-subtitle {
  font-size: 14px;
  color: rgba(245, 240, 235, 0.6);
  letter-spacing: 2px;
  margin-bottom: 40px;
}

.egg-buttons {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 300px;
}

.egg-btn {
  flex: 1;
  background: rgba(245, 240, 235, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  color: #F5F0EB;
  cursor: pointer;
  transition: all 0.2s ease;
}

.egg-btn:active {
  transform: scale(0.95);
  background: rgba(212, 175, 55, 0.1);
}

.egg-btn-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}

.egg-btn-label {
  font-size: 13px;
  letter-spacing: 1px;
}

.egg-message {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 237, 224, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 16px 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 10;
}

.egg-message.show {
  opacity: 1;
}

.egg-message-text {
  font-size: 14px;
  color: #F5F0EB;
  line-height: 1.6;
}

.egg-message-btn {
  margin-top: 12px;
  background: #D4AF37;
  color: #1A0A2E;
  border: none;
  border-radius: 20px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ====== Save Modal ====== */
.save-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.save-modal.active {
  display: flex;
}

.save-modal-content {
  background: rgba(245, 237, 224, 0.15);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  padding: 30px 24px;
  max-width: 320px;
  width: 85%;
  text-align: center;
}

.save-modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.save-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #D4AF37;
  margin-bottom: 8px;
}

.save-modal-text {
  font-size: 14px;
  color: rgba(245, 240, 235, 0.7);
  margin-bottom: 20px;
  line-height: 1.5;
}

.save-modal-buttons {
  display: flex;
  gap: 12px;
}

.save-modal-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.save-modal-btn.primary {
  background: #D4AF37;
  color: #1A0A2E;
}

.save-modal-btn.secondary {
  background: rgba(245, 240, 235, 0.1);
  color: #F5F0EB;
  border: 1px solid rgba(245, 240, 235, 0.2);
}

.save-modal-btn:active {
  transform: scale(0.95);
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.8);
  color: #F5F0EB;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ====== Transition Animations ====== */
.page.slide-in {
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0.5; }
  to { transform: translateX(0); opacity: 1; }
}

.page.slide-out {
  animation: slideOut 0.4s ease forwards;
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0.5; }
}

.page.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

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

.page.fade-out {
  animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ====== Loading Complete Flash ====== */
.flash-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.6), transparent 60%);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.flash-overlay.active {
  animation: flashBurst 0.6s ease-out forwards;
}

@keyframes flashBurst {
  0% { opacity: 0; transform: scale(0.5); }
  30% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(2); }
}

/* ====== Shake Animation ====== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) rotate(-1deg); }
  20%, 40%, 60%, 80% { transform: translateX(5px) rotate(1deg); }
}

.shake-effect {
  animation: shake 0.5s ease-in-out;
}

/* ====== Responsive ====== */
@media (max-width: 360px) {
  .quiz-option {
    font-size: 13px;
    padding: 10px 8px;
    min-height: 60px;
  }
  
  .card-container {
    width: 250px;
    height: 350px;
  }

  .radar-chart {
    width: 200px;
    height: 200px;
  }
}

@media (min-width: 420px) {
  .quiz-content {
    padding: 30px 20px;
  }
  
  .card-container {
    width: 320px;
    height: 440px;
  }
}
