/* 🎬 CINEMATIC MINT RITUAL STYLES */

/* ============================================
   FULL-SCREEN OVERLAY
   ============================================ */

.cinematic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  overflow: hidden;
}

.cinematic-overlay.active {
  opacity: 1;
}

.cinematic-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 600px;
  text-align: center;
  z-index: 10;
}

/* ============================================
   PARTICLES CONTAINER
   ============================================ */

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

/* Ambient floating particles */
.particle.ambient {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(102, 126, 234, 0.6);
  border-radius: 50%;
  animation: float 10s infinite ease-in-out;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0.8;
  }
}

/* Burst particles */
.particle.burst {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: burst 1s ease-out forwards;
}

@keyframes burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx, 50px), var(--ty, -50px)) scale(0);
    opacity: 0;
  }
}

/* Confetti */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall 3s ease-in forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.ritual-progress {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.progress-dots {
  display: flex;
  gap: 12px;
}

.progress-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.progress-dots .dot.active {
  background: #667eea;
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
  animation: pulse-dot 1.5s infinite;
}

.progress-dots .dot.completed {
  background: #4ade80;
  border-color: #4ade80;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.8;
  }
}

/* ============================================
   STAGE STYLES
   ============================================ */

.stage {
  animation: fadeIn 0.8s ease-in;
}

.stage.flash {
  animation: flash 0.2s ease-out;
}

/* Icons */
.ritual-icon {
  font-size: 80px;
  margin-bottom: 30px;
  display: inline-block;
}

.ritual-icon.pulse {
  animation: pulse 2s infinite;
}

.ritual-icon.spin-pulse {
  animation: spin 2s linear infinite, pulse 2s infinite;
}

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

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

/* Typography */
.ritual-title {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.ritual-title.glow {
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.8),
               0 0 40px rgba(102, 126, 234, 0.5);
}

.ritual-title-small {
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 10px 0;
}

.ritual-title-huge {
  font-size: 64px !important;
  font-weight: 800;
  animation: scale-in 0.8s ease-out;
}

.ritual-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.ritual-subtitle-small {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   STAGE 1: STATS
   ============================================ */

.stage-stats .stats-display {
  max-width: 600px;
  margin: 40px auto;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stat-row.locked {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.stat-label {
  flex: 0 0 140px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
}

.stat-bar {
  flex: 1;
  height: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.stat-value {
  flex: 0 0 50px;
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
  text-align: right;
}

/* ============================================
   STAGE 2: PERSONALITY
   ============================================ */

.personality-badge {
  display: inline-block;
  margin: 40px auto;
  padding: 40px 60px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  border: 2px solid rgba(102, 126, 234, 0.5);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(102, 126, 234, 0.4);
}

.badge-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.badge-label {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* ============================================
   STAGE 3: IMAGE GENERATION
   ============================================ */

.generation-progress {
  margin: 40px 0;
}

.progress-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.rotating-tips {
  margin-top: 40px;
  min-height: 60px;
}

.tip {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

/* Image reveal */
.image-preview {
  margin: 40px auto;
  max-width: 500px;
}

.companion-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 20px;
  border: 3px solid rgba(102, 126, 234, 0.5);
  box-shadow: 0 0 60px rgba(102, 126, 234, 0.6);
}

/* ============================================
   STAGE 4: 3D MODEL
   ============================================ */

.split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.left-panel,
.right-panel {
  padding: 20px;
}

.companion-image-small {
  width: 100%;
  max-width: 400px;
  border-radius: 15px;
  border: 2px solid rgba(102, 126, 234, 0.3);
}

.wireframe-preview {
  margin: 30px 0;
}

.wireframe-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border: 3px solid rgba(118, 75, 162, 0.3);
  border-top-color: #764ba2;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

/* ============================================
   STAGE 5: BLOCKCHAIN
   ============================================ */

.blockchain-status {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 16px;
}

.status-label {
  color: rgba(255, 255, 255, 0.6);
}

.status-value {
  color: #fff;
  font-weight: 600;
}

.status-value.confirming {
  color: #fbbf24;
  animation: pulse 1.5s infinite;
}

/* Matrix code effect */
.matrix-code {
  position: relative;
  height: 200px;
  margin-top: 40px;
  overflow: hidden;
}

.matrix-column {
  position: absolute;
  top: -100%;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #00ff00;
  opacity: 0.8;
  animation: matrix-fall 3s linear infinite;
  white-space: nowrap;
}

@keyframes matrix-fall {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

/* ============================================
   STAGE 6: AWAKENING
   ============================================ */

.awakening-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: flash-fade 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes flash-fade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.final-reveal {
  margin: 40px 0;
}

.companion-showcase {
  margin-bottom: 30px;
}

.companion-image-large {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  border: 4px solid rgba(102, 126, 234, 0.6);
  box-shadow: 0 0 80px rgba(102, 126, 234, 0.8);
  animation: scale-in 0.8s ease-out;
}

.companion-details {
  margin-top: 30px;
}

.companion-name {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.companion-stats-summary {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-pill {
  padding: 10px 20px;
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.4);
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.awakening-actions {
  margin-top: 50px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.ritual-btn {
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ritual-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.ritual-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.ritual-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ritual-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-in {
  animation: fadeIn 0.8s ease-in;
}

.fade-in-slow {
  animation: fadeIn 1.5s ease-in;
}

.scale-in {
  animation: scale-in 0.8s ease-out;
}

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

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes flash {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(5);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .ritual-title {
    font-size: 32px;
  }

  .ritual-title-huge {
    font-size: 40px !important;
  }

  .split-view {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .companion-image-large {
    max-width: 300px;
  }

  .awakening-actions {
    flex-direction: column;
  }

  .ritual-btn {
    width: 100%;
  }
}
