/* 『家庭内裁判 〜消えたプリンと残された靴下〜』 カスタムスタイル & アニメーション */

/* フォントのインポート: 親しみやすくも緊張感のある Rounded M PLUS とモダンな英語フォント */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700;900&family=Outfit:wght@400;600;800&display=swap');

:root {
  --font-family-sans: 'M PLUS Rounded 1c', 'Outfit', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-family-sans);
  background-color: #0f172a; /* Slate 900 */
  color: #f8fafc; /* Slate 50 */
}

/* 陪審員ゲージのグラデーション */
.jury-gauge-track {
  background: linear-gradient(90deg, #ef4444 0%, #3b82f6 100%); /* 赤（有罪）から青（無罪） */
}

/* スムーズなトランジション */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 異議あり！カットインアニメーション */
.objection-overlay {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
}

.objection-banner {
  animation: objection-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.objection-text {
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.8), 0 0 40px rgba(239, 68, 68, 0.6);
  animation: objection-stamp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
  opacity: 0;
  transform: scale(3);
}

/* 画面全体の震えエフェクト（異議あり！時） */
.screen-shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* ドロップエリアのグロー効果 */
.drop-slot-active {
  animation: border-pulse 1.5s infinite ease-in-out;
}

/* ビンゴマークアニメーション */
.bingo-marked {
  animation: stamp-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* アニメーション定義 */
@keyframes objection-slide-in {
  0% {
    transform: translateX(-100%) skewX(-15deg);
    opacity: 0;
  }
  70% {
    transform: translateX(5%) skewX(-15deg);
    opacity: 1;
  }
  100% {
    transform: translateX(0) skewX(-15deg);
    opacity: 1;
  }
}

@keyframes objection-stamp {
  0% {
    opacity: 0;
    transform: scale(4) rotate(-15deg);
  }
  80% {
    opacity: 1;
    transform: scale(0.9) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-5deg);
  }
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes border-pulse {
  0%, 100% {
    border-color: rgba(168, 85, 247, 0.4); /* Purple 500 */
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
  }
  50% {
    border-color: rgba(168, 85, 247, 0.8);
    box-shadow: 0 0 12px 4px rgba(168, 85, 247, 0.2);
  }
}

@keyframes stamp-pop {
  0% {
    transform: scale(3);
    opacity: 0;
  }
  70% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #1e293b;
}
::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* カードのドラッグ中などのスタイリング */
.card-dragging {
  opacity: 0.5;
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* リアクションが飛び出すエフェクト用 */
.reaction-floating {
  position: absolute;
  pointer-events: none;
  animation: float-up-fade 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes float-up-fade {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) scale(1.2);
    opacity: 0;
  }
}
