/* ════════════════════════════════════════════════════════
   トロフィー機能のスタイル
   ・#trophy-modal   … トロフィー一覧モーダル（#zukan-modal と同パターン）
   ・.trophy-toast   … Steam風の右上解除通知（TrophyToastUI）
   ・.trophy-btn-badge … トロフィーボタンの未確認（NEW）黄色ドット
   ════════════════════════════════════════════════════════ */

/* ─── トロフィー一覧モーダル ─────────────────────────── */

#trophy-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.62); z-index: 800;
  align-items: center; justify-content: center; padding: 16px;
}
#trophy-modal.open { display: flex; }

#trophy-box {
  background: #fff; border-radius: 24px;
  padding: 22px 18px 18px; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  animation: popIn .35s cubic-bezier(.34,1.56,.64,1);
}

#trophy-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
#trophy-header h2 { font-size: 1.2rem; color: #e07b39; }
#trophy-summary { font-size: .82rem; color: #999; font-weight: bold; white-space: nowrap; }

#trophy-progress-wrap { margin-bottom: 12px; }
#trophy-progress-bar {
  height: 12px; border-radius: 999px; background: #f1e8de; overflow: hidden;
}
#trophy-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffc94d, #ff9b3d);
  border-radius: 999px; transition: width .5s cubic-bezier(.34,1.3,.64,1);
}

#trophy-cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.trophy-tab {
  padding: 7px 14px; border-radius: 18px; border: 2px solid #eee;
  background: #fafafa; color: #777; font-family: inherit; font-size: .82rem;
  font-weight: bold; cursor: pointer; transition: .15s;
}
.trophy-tab.active {
  background: #fff3e8; border-color: var(--orange); color: var(--orange);
}

#trophy-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.trophy-empty { padding: 30px 10px; text-align: center; color: #aaa; font-size: .88rem; }

.trophy-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: #f7f7f7; border: 2px solid transparent; border-radius: 16px;
  padding: 10px 12px; cursor: pointer; transition: transform .12s;
  text-align: left; width: 100%; font-family: inherit;
}
.trophy-item:active { transform: scale(.97); }
.trophy-item.unlocked { background: #fffaf3; border-color: #ffe1bb; }
.trophy-item.locked .trophy-item-icon { filter: grayscale(1) opacity(.45); }
.trophy-item.locked { color: #999; }

.trophy-item-icon {
  flex: 0 0 46px; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: #fff; border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.05);
}
.trophy-item-body { flex: 1 1 auto; min-width: 0; }
.trophy-item-title { font-size: .95rem; font-weight: bold; color: #555; }
.trophy-item.unlocked .trophy-item-title { color: #e07b39; }
.trophy-item-desc { font-size: .78rem; color: #999; margin-top: 2px; line-height: 1.35; }

.trophy-item-progress { flex: 0 0 auto; text-align: right; }
.trophy-item-count { font-size: .8rem; font-weight: bold; color: #b98c5a; white-space: nowrap; }
.trophy-item-date { font-size: .66rem; color: #bbb; margin-top: 2px; white-space: nowrap; }

.trophy-item-bar {
  width: 74px; height: 7px; border-radius: 999px; background: #eee;
  overflow: hidden; margin-top: 4px; margin-left: auto;
}
.trophy-item-bar-fill {
  height: 100%; background: linear-gradient(90deg, #ffc94d, #ff9b3d);
  border-radius: 999px;
}

/* NEWバッジ（各トロフィー） */
.trophy-new-badge {
  position: absolute; top: -7px; right: -5px;
  background: #ffd54d; color: #7a4a00;
  font-size: .62rem; font-weight: bold; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
  animation: trophyNewPulse 1.4s ease-in-out infinite;
}
@keyframes trophyNewPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

#trophy-close {
  display: block; margin: 4px auto 0; padding: 10px 34px;
  border: none; border-radius: 20px; background: var(--orange);
  color: #fff; font-family: inherit; font-size: .95rem; font-weight: bold;
  cursor: pointer;
}
#trophy-close:active { transform: scale(.95); }

/* ─── トロフィーボタンの未確認ドット ─────────────────── */

#btn-open-trophy { position: relative; }
.trophy-btn-badge {
  position: absolute; top: 6px; right: 10px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #ffd233; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.25);
  animation: trophyNewPulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

/* ─── Steam風トースト通知（右上） ────────────────────── */

#trophy-toast-container {
  position: fixed; top: 14px; right: 14px; z-index: 3000;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; /* 通知はタップを邪魔しない */
}

.trophy-toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 240px; max-width: 320px;
  background: linear-gradient(135deg, #fffdf7, #fff3dc);
  border: 2px solid #ffd88f; border-radius: 18px;
  padding: 12px 16px 12px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transform: translateX(120%);
}
/* 右画面外からスライドイン（少し弾む） */
.trophy-toast.trophy-toast-in {
  animation: trophyToastIn .55s cubic-bezier(.34,1.45,.55,1) forwards;
}
/* フェードしながら右へ戻る */
.trophy-toast.trophy-toast-out {
  animation: trophyToastOut .45s ease-in forwards;
}
@keyframes trophyToastIn {
  0%   { transform: translateX(120%); opacity: 0; }
  70%  { transform: translateX(-6%);  opacity: 1; }
  100% { transform: translateX(0);    opacity: 1; }
}
@keyframes trophyToastOut {
  0%   { transform: translateX(0);    opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

.trophy-toast-icon {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: #fff; border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(224,123,57,.18);
}
.trophy-toast-body { min-width: 0; }
.trophy-toast-heading { font-size: .72rem; font-weight: bold; color: #b98c5a; }
.trophy-toast-title {
  font-size: .95rem; font-weight: bold; color: #e07b39; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trophy-toast-desc {
  font-size: .74rem; color: #999; margin-top: 1px; line-height: 1.3;
}

@media (max-width: 480px) {
  .trophy-toast { min-width: 200px; max-width: 78vw; }
}
