/* ================================================
   Resonance & Oracle System — Temple of Iris
   ================================================ */

/* === Resonance + Oracle Section (legacy wrapper removed — now in dashboard.css) === */

/* Progress bar */
.resonance-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.resonance-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b8860b, #ffd700, #fff8dc);
  border-radius: 6px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  will-change: width, box-shadow;
}

.resonance-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: resonance-shimmer 2.5s ease-in-out infinite;
}

@keyframes resonance-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.resonance-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

#resonance-percent {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

#resonance-flavor {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.6;
}

/* Floating gain effect */
.resonance-gain-float {
  position: absolute;
  top: 20px;
  right: 30px;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #ffd700;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  animation: gain-float 1.2s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes gain-float {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* Reward toast */
.resonance-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 14px 28px;
  color: #ffd700;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

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

.resonance-toast-icon {
  color: #ffd700;
  margin-right: 6px;
}

/* Reward elements */
.resonance-reward-monologue {
  display: none;
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  line-height: 1.8;
}

.resonance-reward-bgm {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 20px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  color: #ffd700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
}

.resonance-reward-bgm:hover {
  background: rgba(255, 215, 0, 0.2);
}

/* === Oracle (component styles, container in dashboard.css) === */

/* Oracle mask */
.oracle-mask {
  width: 100%;
  min-height: 100px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.oracle-mask.inactive {
  background: linear-gradient(135deg, #1a0a2e, #16213e);
  border: 1px solid rgba(128, 100, 200, 0.2);
}

.oracle-mask.inactive:hover {
  border-color: rgba(128, 100, 200, 0.4);
}

.oracle-mask.active {
  background: linear-gradient(135deg, #1a0a2e, #2a1a3e);
  border: 1px solid rgba(255, 215, 0, 0.4);
  animation: oracle-glow 3s ease-in-out infinite;
  will-change: box-shadow;
  transform: translateZ(0);
}

.oracle-mask.active:hover {
  border-color: rgba(255, 215, 0, 0.7);
}

.oracle-mask.revealing {
  animation: oracle-reveal 0.8s ease-out forwards;
}

.oracle-mask.revealed {
  background: transparent;
  border: none;
  min-height: 0;
  cursor: default;
}

@keyframes oracle-glow {
  0%   { box-shadow: 0 0 10px rgba(255, 215, 0, 0.2), 0 0 20px rgba(255, 215, 0, 0.05); }
  50%  { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.2), 0 0 60px rgba(255, 215, 0, 0.05); }
  100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.2), 0 0 20px rgba(255, 215, 0, 0.05); }
}

@keyframes oracle-reveal {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.5; transform: scale(1.05); box-shadow: 0 0 60px rgba(255, 215, 0, 0.8); }
  100% { opacity: 0; transform: scale(0.95); height: 0; min-height: 0; padding: 0; margin: 0; border: none; }
}

.oracle-mask-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
}

.oracle-mask-icon {
  font-size: 1.8rem;
  color: rgba(200, 180, 255, 0.5);
}

.oracle-mask-text {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
}

.oracle-mask.active .oracle-mask-text {
  color: rgba(255, 215, 0, 0.9);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Oracle timer */
#oracle-timer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 14px;
  letter-spacing: 0.5px;
}

/* Oracle message */
#oracle-message {
  display: none;
  animation: oracle-msg-in 0.8s ease-out;
}

@keyframes oracle-msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.oracle-text {
  font-size: 1rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
  padding: 16px 8px;
}

.oracle-sign {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: rgba(255, 215, 0, 0.6);
  margin-top: 8px;
  letter-spacing: 2px;
}

/* Oracle tooltip */
.oracle-tooltip {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(200, 180, 255, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 10;
}

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

/* === Responsive === */
@media (max-width: 600px) {
  #resonance-percent {
    font-size: 1.3rem;
  }

  #resonance-flavor {
    font-size: 0.78rem;
  }
}
