/* =============================================
 * GOLDEN RESONANCE - 完全統合CSS（修正版）
 * ============================================= */

/* コンテナ */
.resonance-container {
  position: relative;
  margin-bottom: 2rem;
}

/* 共鳴レベル0：通常 */
.resonance-container.lv0 .sns-card {
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

/* 共鳴レベル1：少し光る */
.resonance-container.lv1 .sns-card {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* 共鳴レベル2：強く光る + 枠点滅 */
.resonance-container.lv2 .sns-card {
  box-shadow: 0 0 28px rgba(255, 100, 255, 0.5);
  animation: glowLoop 4s ease-in-out infinite;
}

/* 共鳴レベル3：神域化 */
.resonance-container.lv3 .sns-card {
  box-shadow: 0 0 36px rgba(255, 255, 180, 0.8), 0 0 12px rgba(255, 200, 200, 0.6);
  animation: glowLoop 3s ease-in-out infinite;
}


/* ボタン本体 */
.resonate-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 1.2em;
  font-size: 1rem;
  color: #d6285d;
  background-color: #fff4f8;
  border: 1px solid #f3b6cc;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: visible; /* +1を外側に出す */
  z-index: 20;
  min-height: 40px;
}

/* ホバー時 */
.resonate-button:hover {
  background-color: #ffe3ef;
  transform: scale(1.05);
}

/* 左ハート（飛ぶ） */
.resonance-icon.left {
  position: absolute;
  left: 0;
  transform: scale(0.7);
  opacity: 0.8;
}

.fly-right {
  animation: flyRight 0.6s ease-out forwards;
}

@keyframes flyRight {
  0% {
    transform: translateX(0) scale(0.7);
    opacity: 1;
  }
  100% {
    transform: translateX(100px) scale(0.4);
    opacity: 0;
  }
}

/* 右ハート（強調） */
.resonance-icon.right.build-up {
  animation: buildUp 0.5s ease-out;
}

@keyframes buildUp {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px gold);
  }
  50% {
    transform: scale(1.3);
    filter: drop-shadow(0 0 12px gold);
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px gold);
  }
}

/* バースト（背景） */
.resonance-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 180, 0.3) 0%, rgba(255, 255, 180, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0.8;
  animation: burstFade 0.6s ease-out forwards;
  z-index: 11;
  pointer-events: none;
}

@keyframes burstFade {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

/* +1 フロート */
.count-float {
  position: absolute;
  right: 0;
  top: -1.6rem;
  font-size: 0.85rem;
  color: #d6285d;
  font-weight: bold;
  opacity: 0;
  animation: floatUp 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 15;
}

@keyframes floatUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-20px);
    opacity: 0;
  }
}

/* カウント数字 */
.resonance-count {
  font-weight: bold;
  color: #d6285d;
  font-size: 0.95rem;
  z-index: 14;
}

/* 心電図波形（SVG） */
.ecg-wave {
  position: absolute;
  bottom: 30px;
  width: 150px;
  height: 30px;
  z-index: 11;
  animation: waveMove 1s linear forwards;
  opacity: 0.85;
  pointer-events: none;
}

.ecg-wave path {
  stroke: magenta;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes waveMove {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(300px); opacity: 0; }
}

/* 通常リズム */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(214, 40, 93, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(214, 40, 93, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 40, 93, 0); }
}

.resonate-button.pulse {
  animation: pulse 1.5s ease-out infinite;
}

/* 高速パルス（押した瞬間用） */
@keyframes pulse-fast {
  0%   { box-shadow: 0 0 0 0 rgba(255, 80, 100, 0.7); }
  50%  { box-shadow: 0 0 0 12px rgba(255, 80, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 80, 100, 0); }
}

.resonate-button.pulse-fast {
  animation: pulse-fast 0.5s ease-out;
}