/* ===== PARTYPLAY SKILL SYSTEM STYLES ===== */

/* ── 타마고치 스킬 오버레이 ─────────────────────────────────── */
#tamaSkillOverlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.65);
  justify-content: center;
  align-items: flex-end;
  backdrop-filter: blur(3px);
}
.skill-ovl-panel {
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  background: #141428;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.5);
}
.skill-ovl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.skill-ovl-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.skill-ovl-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.skill-ovl-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 20px 6px;
  flex-shrink: 0;
}
.skill-tab {
  padding: 10px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: none;
  color: #aaa;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.skill-tab.active {
  background: #4f6ef7;
  border-color: #4f6ef7;
  color: #fff;
}

/* 장착 슬롯 */
.skill-equip-section {
  padding: 10px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.skill-equip-label {
  font-size: 10px;
  color: #666;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.skill-equip-slots {
  display: flex;
  gap: 10px;
}
.skill-slot {
  flex: 1;
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.1s;
}
.skill-slot:active { transform: scale(0.95); }
.skill-slot.empty {
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed rgba(255,255,255,0.12);
  cursor: default;
}
.skill-slot.filled {
  background: rgba(79,110,247,0.12);
  border: 1.5px solid rgba(79,110,247,0.4);
}
.skill-slot-emoji { font-size: 22px; line-height: 1; }
.skill-slot-plus { font-size: 22px; color: rgba(255,255,255,0.2); line-height: 1; }
.skill-slot-name { font-size: 10px; color: #bbb; text-align: center; font-weight: 700; word-break: keep-all; }
.skill-slot-hint { font-size: 9px; color: #555; text-align: center; }

/* 스킬 목록 */
.skill-list-section {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px 24px;
}
.skill-list-label {
  font-size: 10px;
  color: #666;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.15s;
}
.skill-item.unlocked {
  background: rgba(79,110,247,0.07);
  border-color: rgba(79,110,247,0.18);
}
.skill-item.equipped {
  background: rgba(79,110,247,0.16);
  border-color: rgba(79,110,247,0.5);
  box-shadow: inset 0 0 0 1px rgba(79,110,247,0.3);
}
.skill-item.locked { opacity: 0.55; }
.skill-item-icon { font-size: 24px; flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; position: relative; z-index: 2; -webkit-tap-highlight-color: transparent; }
.skill-item-body { flex: 1; min-width: 0; }
.skill-item-name { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.skill-item-desc { font-size: 11px; color: #999; margin-bottom: 0; }
.skill-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.skill-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.skill-progress-fill { height: 100%; background: #4f6ef7; border-radius: 2px; }
.skill-progress-text { font-size: 10px; color: #666; white-space: nowrap; }
.skill-item-action { flex-shrink: 0; }
.skill-btn-equip {
  padding: 10px 16px;
  border-radius: 20px;
  background: #4f6ef7;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.skill-btn-equip:active { opacity: 0.8; }
.skill-btn-unequip {
  padding: 10px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #bbb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.skill-item-max { font-size: 10px; color: #555; }
.skill-lock-icon { font-size: 17px; opacity: 0.45; }

/* ── 포트리스 인게임 스킬 바 ──────────────────────────────────── */
#fortSkillBar {
  display: none;
  position: absolute;
  bottom: 44px;
  left: 0; right: 0;
  z-index: 12;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px;
  pointer-events: none;
}
#fortSkillBar.visible {
  display: flex;
  pointer-events: auto;
  touch-action: auto;
}
.fort-skill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: all 0.13s;
  min-width: 56px;
  min-height: 44px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.fort-skill-btn { touch-action: manipulation; }
.fort-skill-btn:active { transform: scale(0.92); }
.fort-skill-btn.active {
  border-color: #7c9ffe;
  background: rgba(79,110,247,0.38);
  box-shadow: 0 0 10px rgba(79,110,247,0.5), inset 0 0 0 1px rgba(79,110,247,0.5);
}
.fort-skill-btn.depleted {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}
.fort-skill-btn-default {
  border-style: solid;
  border-color: rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.45);
}
.fort-skill-btn-default.active {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.12);
  box-shadow: none;
}
.fort-skill-emoji { font-size: 17px; line-height: 1; }
.fort-skill-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e0e0e0;
}
.fort-skill-uses { font-size: 10px; color: rgba(255,255,255,0.45); }
.fort-skill-uses.full { color: #7cfc7c; }

/* 플레이어 바 상태 아이콘 */
.fort-status-icon {
  display: inline-block;
  font-size: 11px;
  margin-left: 3px;
  animation: fort-status-pulse 1s ease-in-out infinite;
}
@keyframes fort-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* 스킬 발동 플래시 */
.fort-skill-flash {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 16px rgba(255,255,255,0.8);
  pointer-events: none;
  animation: fort-skill-flash-anim 0.9s ease-out forwards;
  z-index: 25;
  white-space: nowrap;
  text-align: center;
}
@keyframes fort-skill-flash-anim {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
  30%  { opacity: 1; transform: translate(-50%, -58%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1.3); }
}

/* ── 모바일 반응형 (430px 이하) ─────────────────────────────── */
@media (max-width: 430px) {
  /* 오버레이 패널: 전체 폭 사용 */
  .skill-ovl-panel {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 88vh;
  }

  /* 헤더 패딩 축소 */
  .skill-ovl-header {
    padding: 14px 16px 10px;
  }

  /* 탭 영역 */
  .skill-ovl-tabs {
    padding: 8px 16px 6px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .skill-tab {
    padding: 10px 14px;
    font-size: 12px;
  }

  /* 장착 슬롯 */
  .skill-equip-section {
    padding: 8px 16px 10px;
  }
  .skill-equip-slots {
    gap: 6px;
  }
  .skill-slot {
    padding: 8px 4px;
    border-radius: 10px;
  }
  .skill-slot-emoji { font-size: 20px; }
  .skill-slot-name { font-size: 10px; }
  .skill-slot-hint { font-size: 9px; }

  /* 스킬 목록 */
  .skill-list-section {
    padding: 8px 16px 20px;
  }
  .skill-list { gap: 6px; }
  .skill-item {
    padding: 10px;
    gap: 8px;
  }
  .skill-item-name { font-size: 13px; }
  .skill-item-desc { font-size: 11px; }

  /* 장착/해제 버튼 모바일 보정 */
  .skill-btn-equip,
  .skill-btn-unequip {
    padding: 10px 14px;
    font-size: 12px;
  }

  /* ── 포트리스 인게임 스킬 바 모바일 ── */
  #fortSkillBar {
    bottom: 50px;
    gap: 4px;
    padding: 4px 4px;
  }
  .fort-skill-btn {
    padding: 5px 6px;
    min-width: 48px;
    min-height: 44px;
    border-radius: 8px;
  }
  .fort-skill-emoji { font-size: 16px; }
  .fort-skill-name {
    font-size: 10px;
    max-width: 52px;
  }
  .fort-skill-uses { font-size: 9px; }
}

/* ── 극소형 화면 (360px 이하) ──────────────────────────────── */
@media (max-width: 360px) {
  .skill-ovl-header {
    padding: 12px 12px 8px;
  }
  .skill-ovl-title { font-size: 15px; }

  .skill-ovl-tabs {
    padding: 6px 12px 4px;
    gap: 4px;
  }
  .skill-tab {
    padding: 8px 12px;
    font-size: 11px;
  }

  .skill-equip-section {
    padding: 6px 12px 8px;
  }
  .skill-equip-slots { gap: 4px; }
  .skill-slot {
    padding: 6px 3px;
  }
  .skill-slot-emoji { font-size: 18px; }
  .skill-slot-name { font-size: 9px; }

  .skill-list-section {
    padding: 6px 12px 16px;
  }
  .skill-item {
    padding: 8px;
    gap: 6px;
  }
  .skill-item-icon { font-size: 20px; width: 36px; height: 36px; }
  .skill-item-name { font-size: 12px; }
  .skill-item-desc { font-size: 10px; }

  .skill-btn-equip,
  .skill-btn-unequip {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 44px;
  }

  /* 포트리스 스킬 바 극소형 */
  #fortSkillBar {
    gap: 3px;
    padding: 3px 2px;
  }
  .fort-skill-btn {
    padding: 4px 5px;
    min-width: 42px;
    min-height: 44px;
    gap: 1px;
  }
  .fort-skill-emoji { font-size: 15px; }
  .fort-skill-name {
    font-size: 9px;
    max-width: 44px;
  }
}
