/* ==============================================================================
   Dead by Daylight [TAB] In-Game Scoreboard HUD Style
   ============================================================================== */

.match-view-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.4s ease forwards;
}

/* 상단 매치 상태 바 */
.match-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

.match-badge {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-badge.killer {
  color: var(--color-killer);
}

.match-badge.surv {
  color: var(--color-surv);
}

.match-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 리롤 사용 안내 배너 */
.reroll-guide-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(20, 16, 26, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.reroll-guide-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.reroll-guide-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: #fff;
}

.reroll-guide-desc {
  font-size: 12.5px;
  color: #fde68a;
  line-height: 1.45;
  word-break: keep-all;
}

.btn-reroll-all-perks {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
  padding: 10px 18px;
  font-size: 13.5px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  word-break: keep-all;
}

@media (max-width: 768px) {
  .match-top-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
  }
  .match-badge {
    font-size: 16px;
  }
  .match-top-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .match-top-actions .rule-pill,
  .match-top-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
  .survivors-team-card {
    padding: 14px 12px;
  }
  .reroll-guide-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
  }
  .reroll-guide-info {
    width: 100%;
  }
  .reroll-guide-desc {
    font-size: 12px;
  }
  .btn-reroll-all-perks {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    justify-content: center;
    box-sizing: border-box;
    white-space: normal;
  }
  .survivor-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "profile profile"
      "gear offering"
      "perks perks" !important;
    gap: 12px !important;
    padding: 14px 12px !important;
  }
  .player-profile {
    grid-area: profile;
  }
  .item-gear-cluster {
    grid-area: gear;
  }
  .offering-slot-box {
    grid-area: offering;
    align-self: center;
  }
  .perks-cluster {
    grid-area: perks;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
  }
  .perk-diamond-frame {
    width: 48px;
    height: 48px;
  }
  .perk-diamond-bg {
    width: 38px;
    height: 38px;
  }
  .perk-img {
    width: 40px;
    height: 40px;
  }
  .btn-perk-reroll {
    font-size: 10.5px;
    padding: 3px 6px;
  }
}

/* 메인 허드 레이아웃: 생존자 4인 스쿼드 + 살인마 카드 */
.hud-grid {
  display: grid;
  grid-template-columns: 3.2fr 1.3fr;
  gap: 24px;
}

@media (max-width: 1080px) {
  .hud-grid {
    grid-template-columns: 1fr;
  }
}

/* 생존자 팀 리스트 */
.survivors-team-card {
  background: rgba(15, 12, 22, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.team-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-surv);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 생존자 단일 행 (데바데 TAB 화면 스타일) */
.survivor-row {
  display: grid;
  grid-template-columns: 210px 90px 1fr 50px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  position: relative;
}

@media (max-width: 950px) {
  .survivor-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.survivor-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
}

.survivor-row.my-row {
  border-color: #38bdf8;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(255, 255, 255, 0.03));
}

/* 플레이어 & 캐릭터 프로필 */
.player-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-frame {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-survivor);
  background: #110d1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  padding: 1px;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 50%;
  background: radial-gradient(circle at center, #241c33 0%, #0d0a14 100%);
}

.profile-meta .p-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-meta .c-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==============================================================================
   아이템 & 애드온 등급(Rarity Tier) 컬러 테두리 및 글로우
   ============================================================================== */
.tier-common {
  border-color: #795548 !important;
  box-shadow: 0 0 6px rgba(121, 85, 72, 0.5) !important;
}

.tier-uncommon {
  border-color: #eab308 !important;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.5) !important;
}

.tier-rare {
  border-color: #22c55e !important;
  box-shadow: 0 0 9px rgba(34, 197, 94, 0.5) !important;
}

.tier-very_rare {
  border-color: #a855f7 !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6) !important;
}

.tier-ultra_rare {
  border-color: #ec4899 !important;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.7) !important;
  animation: ultraGlow 2s infinite alternate ease-in-out;
}

@keyframes ultraGlow {
  from { box-shadow: 0 0 8px rgba(236, 72, 153, 0.5); }
  to { box-shadow: 0 0 18px rgba(236, 72, 153, 0.9); }
}

/* 아이템 슬롯 */
.item-addon-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-slot-box {
  width: 56px;
  height: 56px;
  background: #14101d;
  border: 2px solid #554466;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 4px;
}

.item-slot-box:hover {
  transform: scale(1.08);
}

.addon-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.addon-slot-box {
  width: 27px;
  height: 27px;
  background: #14101d;
  border: 1.5px solid #4a3b59;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 2px;
}

.addon-slot-box:hover {
  transform: scale(1.15);
}

/* 아이템(위) + 애드온 2개(아래, 아이템 가로 폭에 맞춰 나란히) */
.item-gear-cluster {
  --item-size: 60px;
  --addon-gap: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--addon-gap);
  width: var(--item-size);
}

.item-gear-cluster .item-slot-box {
  width: var(--item-size);
  height: var(--item-size);
}

.addon-slots-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--addon-gap);
  width: var(--item-size);
}

.addon-slots-row .addon-slot-box {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.btn-item-reroll {
  width: 100%;
  padding: 3px 2px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  margin-top: 2px;
}

.btn-item-reroll:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* ==============================================================================
   4개의 다이아몬드 퍽 슬롯 및 리롤 버튼 UI
   ============================================================================== */
.perks-cluster {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.perk-unit-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.perk-diamond-frame {
  width: 54px;
  height: 54px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.perk-diamond-frame:hover {
  transform: scale(1.15) translateY(-3px);
  z-index: 10;
}

.perk-diamond-bg {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #5b1d82 0%, #170924 100%);
  border: 2px solid #b545f0;
  box-shadow: 0 0 10px rgba(181, 69, 240, 0.4);
  transform: rotate(45deg);
  border-radius: 6px;
  position: absolute;
  transition: all 0.2s ease;
}

.perk-diamond-frame.killer-perk .perk-diamond-bg {
  background: radial-gradient(circle, #801414 0%, #240909 100%);
  border-color: #f04545;
  box-shadow: 0 0 10px rgba(240, 69, 69, 0.4);
}

.perk-img {
  width: 46px;
  height: 46px;
  position: relative;
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
}

/* 명확한 리롤 버튼 스타일 */
.btn-perk-reroll {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border: 1px solid #fbbf24;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.5);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-perk-reroll:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.8);
}

.btn-perk-reroll:active {
  transform: translateY(1px);
}

/* 공물 슬롯 */
.offering-slot-box {
  width: 42px;
  height: 42px;
  background: #120e18;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 3px;
}

/* 살인마 전용 카드 (오른쪽 패널) */
.killer-team-card {
  background: rgba(22, 10, 10, 0.9);
  border: 1px solid rgba(255, 51, 51, 0.35);
  box-shadow: 0 8px 32px rgba(179, 26, 26, 0.2);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.killer-header {
  border-bottom: 1px solid rgba(255, 51, 51, 0.2);
  padding-bottom: 12px;
}

.killer-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-killer);
  display: flex;
  align-items: center;
  gap: 8px;
}

.killer-content-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 10px 0;
}

.killer-hidden-notice {
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
}

.killer-hidden-notice .fog-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 0.9; transform: scale(1.05); }
  100% { opacity: 0.4; transform: scale(0.95); }
}

.killer-portrait-box {
  width: 140px;
  height: 150px;
  border-radius: 16px;
  border: 2px solid var(--color-killer);
  background: radial-gradient(circle at center, #3d0808 0%, #140303 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.4);
  overflow: hidden;
  padding: 4px;
}

.killer-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.killer-info-meta h4 {
  font-family: var(--font-title);
  font-size: 19px;
  color: #fff;
  margin-bottom: 4px;
}

.killer-info-meta p {
  font-size: 13px;
  color: #ff9999;
}

/* 생존자 전용 비밀 전략 채팅창 */
.survivor-chat-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-survivor);
  border-radius: 14px;
  padding: 16px;
  margin-top: 10px;
  text-align: left !important;
  align-items: stretch !important;
  width: 100%;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-surv);
  margin-bottom: 12px;
  text-align: left !important;
  width: 100%;
}

.chat-messages {
  height: 130px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  text-align: left !important;
  align-items: flex-start !important;
  width: 100%;
}

.chat-item {
  font-size: 13px;
  line-height: 1.4;
  text-align: left !important;
  width: 100%;
  display: block;
  word-break: break-word;
}

.chat-item .author {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 6px;
  text-align: left !important;
}

.chat-item .text {
  text-align: left !important;
  color: #f1f5f9;
}

.chat-item.general .author {
  color: #ffcc00;
  text-align: left !important;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  text-align: left !important;
  width: 100%;
}

.chat-input-bar input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #fff;
  text-align: left !important;
}

/* 툴팁 UI */
#dbd-tooltip {
  position: fixed;
  display: none;
  background: #110c17;
  border: 1px solid #7c3aed;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(124, 58, 237, 0.4);
  border-radius: 12px;
  padding: 16px;
  max-width: 330px;
  pointer-events: none;
  z-index: 1000;
  color: #fff;
}

#dbd-tooltip .tt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

#dbd-tooltip .tt-name {
  font-size: 15px;
  font-weight: 800;
  color: #f3e8ff;
}

#dbd-tooltip .tt-en {
  font-size: 12px;
  color: var(--text-muted);
}

#dbd-tooltip .tt-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  background: #7c3aed;
}

#dbd-tooltip .tt-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #cbd5e1;
}

/* ==============================================================================
   살인마 플레이어 전용 VIP 집중 뷰 (.killer-vip-mode)
   ============================================================================== */
.hud-grid.killer-vip-mode {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hud-grid.killer-vip-mode .survivors-team-card {
  order: 2;
  background: rgba(15, 12, 22, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 16px 20px;
}

.hud-grid.killer-vip-mode .survivors-team-card .team-header {
  padding-bottom: 8px;
}

.hud-grid.killer-vip-mode .killer-team-card {
  order: 1;
  width: 100%;
  background: radial-gradient(circle at 50% 15%, rgba(185, 28, 28, 0.22), rgba(15, 10, 18, 0.95) 70%);
  border: 2px solid rgba(239, 68, 68, 0.6);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(220, 38, 38, 0.35);
  padding: 26px;
  border-radius: 20px;
}

.killer-vip-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.killer-vip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  padding-bottom: 10px;
}

.killer-vip-title {
  font-family: var(--font-title);
  font-size: 20px;
  color: #ff4d4d;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.killer-vip-badge {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid #ef4444;
}

.killer-vip-main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .killer-vip-main-layout {
    grid-template-columns: 1fr;
  }
}

.killer-vip-portrait-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.killer-vip-portrait-box {
  width: 210px;
  height: 210px;
  border-radius: 14px;
  border: 2.5px solid #ef4444;
  background: radial-gradient(circle at 50% 70%, #7a1515, #1c0505 75%);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45), inset 0 -30px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  padding: 0;
  position: relative;
}

.killer-vip-portrait-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 11px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7));
  animation: portraitIn 0.5s ease-out;
}

@keyframes portraitIn {
  from { opacity: 0; transform: scale(1.05); filter: brightness(0.4); }
  to { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.killer-vip-name-ko {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

.killer-vip-name-en {
  font-size: 11.5px;
  color: var(--text-muted);
}

.killer-vip-power-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
  width: 100%;
  margin-top: 2px;
}

.killer-vip-power-label {
  font-size: 10px;
  color: #ef4444;
  font-weight: 700;
  text-transform: uppercase;
}

.killer-vip-power-name {
  font-size: 13px;
  font-weight: 700;
  color: #fca5a5;
  margin-top: 1px;
}

.killer-vip-loadout-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* VIP 애드온 섹션 */
.vip-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.vip-addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.vip-addon-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.vip-addon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.vip-addon-icon-box {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  background: rgba(0, 0, 0, 0.4);
}

.vip-addon-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vip-addon-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.vip-addon-desc {
  font-size: 11.5px;
  line-height: 1.35;
  color: #cbd5e1;
}

/* VIP 퍽 섹션 */
.vip-perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .vip-perks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vip-perk-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  gap: 4px;
  transition: all 0.2s;
  height: 100%;
  box-sizing: border-box;
}

.vip-perk-card:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
}

.vip-perk-diamond {
  width: 78px;
  height: 78px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
  flex-shrink: 0;
}

.vip-perk-diamond .perk-diamond-bg {
  width: 58px;
  height: 58px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #4a0e4e, #2a0845);
  border: 2px solid #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  position: absolute;
}

.vip-perk-diamond .perk-img {
  width: 58px;
  height: 58px;
  z-index: 2;
  object-fit: contain;
}

.vip-perk-name {
  font-size: 13px;
  font-weight: 700;
  color: #f3f4f6;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vip-perk-desc-preview {
  font-size: 11px;
  line-height: 1.35;
  color: #94a3b8;
  max-height: 44px;
  min-height: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-grow: 1;
  margin-bottom: 6px;
}

/* VIP 리롤 버튼 (항상 카드 최하단에 일치하여 고정) */
.btn-vip-reroll {
  width: 100%;
  padding: 6px 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 700;
  font-size: 11px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
  flex-shrink: 0;
}

.btn-vip-reroll:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.vip-all-reroll-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.7));
  border: 1px solid rgba(245, 158, 11, 0.6);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  box-sizing: border-box;
  width: 100%;
}

.vip-all-reroll-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.vip-all-reroll-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #fff;
}

.vip-all-reroll-desc {
  font-size: 12px;
  color: #fde68a;
  line-height: 1.4;
}

.vip-reroll-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.vip-all-reroll-banner .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .vip-all-reroll-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
  }
  .vip-reroll-btn-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .vip-all-reroll-banner .btn {
    width: 100%;
    padding: 12px 14px;
    justify-content: center;
  }
}

/* 살인마 VIP 뷰에서는 생존자 패널을 최소화 */
.hud-grid.killer-vip-mode .survivor-row {
  padding: 8px 14px;
  font-size: 12px;
}

.hud-grid.killer-vip-mode .survivor-row .avatar-frame {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

/* ==============================================================================
   생존자 로드아웃 시: 살인마 카드 자리에 채팅창 배치 스타일
   ============================================================================== */
.killer-team-card.surv-chat-mode {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.15);
  background: rgba(12, 16, 26, 0.95);
  display: flex;
  flex-direction: column;
  text-align: left !important;
}

.killer-team-card.surv-chat-mode .killer-content-body {
  align-items: stretch !important;
  text-align: left !important;
}

.fog-mini-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  width: 100%;
  text-align: left !important;
}

.survivor-chat-panel.in-killer-panel {
  margin-top: 0;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left !important;
  align-items: stretch !important;
  width: 100%;
}

.survivor-chat-panel.in-killer-panel .chat-messages {
  height: 290px;
  max-height: 330px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left !important;
  align-items: flex-start !important;
}

/* ==============================================================================
   모바일 스마트폰 화면 (< 768px, < 480px) 매치 HUD 전면 최적화
   ============================================================================== */
@media (max-width: 768px) {
  /* 매치 상단 상태 바 모바일 정렬 */
  .match-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .match-badge {
    justify-content: center;
    font-size: 14px;
    text-align: center;
  }

  .match-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  #match-rerolls-badge {
    grid-column: 1 / -1;
    text-align: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 13px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #e9d5ff;
  }

  .match-top-actions .btn {
    width: 100%;
    padding: 9px 8px;
    font-size: 12px;
    justify-content: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  #btn-leave-match {
    grid-column: 1 / -1;
  }

  /* HUD 그리드 1열 스택 및 여백 슬림화 */
  .hud-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .survivors-team-card,
  .killer-team-card {
    padding: 14px 12px;
    border-radius: 14px;
  }

  .team-header,
  .killer-header {
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .team-header h3,
  .killer-header h3 {
    font-size: 16px;
  }

  /* 생존자 행 카드 모바일 콤팩트 카드 */
  .survivor-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 10px;
    gap: 10px;
    border-radius: 10px;
  }

  .survivor-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .player-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .player-profile .avatar-frame {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .player-profile .profile-texts {
    min-width: 0;
    overflow: hidden;
  }

  .player-profile .player-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-profile .character-name {
    font-size: 11px;
    color: var(--text-muted);
  }

  .survivor-loadout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 10px;
    border-radius: 8px;
  }

  .perks-cluster {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
  }

  .perk-diamond-frame {
    width: 38px;
    height: 38px;
  }

  .item-slot-box, .offering-slot-box {
    width: 38px;
    height: 38px;
  }

  .addon-slot-box {
    width: 18px;
    height: 18px;
  }

  /* 살인마 VIP 모드 모바일 최적화 */
  .killer-vip-hud-panel {
    padding: 12px 10px;
  }

  .killer-vip-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* 초상화 컬럼: 모바일 가로형 배너로 슬림하게 */
  .killer-vip-char-col {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    text-align: left;
  }

  .killer-vip-portrait-frame {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    margin: 0;
  }

  .killer-vip-meta {
    flex: 1;
    min-width: 0;
  }

  .killer-vip-name {
    font-size: 18px;
    margin: 2px 0;
  }

  .killer-vip-power-box {
    display: none; /* 모바일 헤더 슬림화를 위해 카드 내부 정보로 전환 */
  }

  /* 살인마 애드온 모바일 1열 카드 */
  .killer-vip-addon-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .vip-addon-card {
    padding: 8px 10px;
    gap: 10px;
  }

  .vip-addon-icon-box {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .vip-addon-name {
    font-size: 13.5px;
  }

  .vip-addon-desc {
    font-size: 11.5px;
    line-height: 1.4;
  }

  /* 살인마 퍽 4개 모바일 1열 정렬 */
  .killer-vip-perk-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .vip-perk-card {
    padding: 8px 10px;
    gap: 10px;
  }

  .vip-perk-icon-box {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .vip-perk-name {
    font-size: 13.5px;
  }

  .vip-perk-desc {
    font-size: 11.5px;
    line-height: 1.4;
  }

  .vip-perk-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
  }

  /* 살인마 리롤 버튼 그룹 */
  .vip-all-reroll-banner {
    padding: 12px 10px;
    gap: 10px;
  }

  .vip-reroll-btn-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .vip-reroll-btn-group .btn {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    justify-content: center;
  }

  /* 채팅 패널 높이 조절 */
  .survivor-chat-panel.in-killer-panel .chat-messages {
    height: 200px;
    max-height: 220px;
  }
}

@media (max-width: 480px) {
  .survivor-loadout-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .perks-cluster {
    justify-content: center;
    gap: 8px;
  }

  .perk-diamond-frame {
    width: 42px;
    height: 42px;
  }

  .item-slot-box, .offering-slot-box {
    width: 42px;
    height: 42px;
  }

  .addon-slot-box {
    width: 20px;
    height: 20px;
  }

  .btn-perk-reroll {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
  }
}


