/* ✨ [추가] 아이템 수량 표시 스타일 */
/* ✨ [추가] HUD 아이템 컨테이너 스타일 */
.hud-item-container {
    position: relative; /* ✨ 이 컨테이너를 기준점으로 설정 */
    display: inline-block; /* 아이템들이 가로로 나열되도록 */
    margin: 2px;
}
.item-quantity {
    position: absolute; /* ✨ 부모(.hud-item-container)를 기준으로 위치 지정 */
    bottom: -5px;
    right: -5px;
    background-color: #2c3e50;
    color: white;
    font-weight: bold;
    font-size: 14px;
    padding: 2px 5px;
    border-radius: 5px;
    border: 1px solid white;
    pointer-events: none; /* ✨ [추가] 이 요소는 마우스 클릭을 무시합니다. */
}
/* 보관함에 있는 아이템 이미지 */
.unequipped-item {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 이미지 비율 유지 */
    cursor: pointer;
}

/* 장착칸에 있는 아이템 이미지 */
.equipped-item {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}
/* ✨ [추가] 비차단형 경고 팝업 스타일 */
#warningPopup {
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(200, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #FFD700;
    text-align: center;
    z-index: 10002; /* 다른 UI보다 위에 표시 */
    pointer-events: none; /* ✨ 팝업이 마우스 클릭을 가로채지 않도록 설정 */
    animation: warning-pulse 1s infinite;
}

.warning-title {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 5px black;
}

.warning-message {
    font-size: 1.2em;
}

/* 경고 팝업 반짝이는 애니메이션 */
@keyframes warning-pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}
/* 채팅창 관련 스타일 */
/* ✨ [추가] 노란색 반짝임 애니메이션 */
@keyframes shield-hit-glow {
    0% { box-shadow: 0 0 8px rgba(241, 196, 15, 0.5); }
    50% { box-shadow: 0 0 25px 8px rgba(241, 196, 15, 1); }
    100% { box-shadow: 0 0 8px rgba(241, 196, 15, 0.5); }
}

/* ✨ [추가] 빨간색 반짝임 애니메이션 */
@keyframes shields-depleted-glow {
    0% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.7); transform: scale(1); }
    50% { box-shadow: 0 0 30px 10px rgba(231, 76, 60, 1); transform: scale(1.1); }
    100% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.7); transform: scale(1); }
}

/* ✨ [추가] 각 상황에 맞는 알림 클래스 */
#shieldSetupButton.shield-hit-glow {
    animation: shield-hit-glow 1s infinite; /* 노란색으로 반짝임 */
}
#shieldSetupButton.shields-depleted-glow {
    animation: shields-depleted-glow 1s infinite; /* 방패 없을 땐 계속 빨간색으로 반짝임 */
}
#chatToggleButton {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 9998;
}

#chatWindow {
    display: none; /* 평소에는 숨겨져 있음 */
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 410px;
    height: 450px;
    background-color: rgba(44, 62, 80, 0.9);
    border: 1px solid #7f8c8d;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

#chatMessages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    color: #ecf0f1;
}
/* 채팅 메시지 스타일 수정 */
.chat-message {
    margin-bottom: 8px;
    line-height: 1.4; /* 줄 간격 조절 */
}
.chat-timestamp {
    font-size: 0.75em;
    color: #95a5a6; /* 시간은 회색으로 */
    margin-right: 8px;
}
.chat-user { font-weight: bold; color: #f1c40f; }
.chat-text { margin-left: 5px; }

/* ✨ [추가] 시스템 메시지 전용 스타일 */
.chat-message.system-message .chat-user {
    color: #3498db; /* [알림] 텍스트는 파란색 */
}
.chat-message.system-message .chat-text {
    color: #e0e0e0;
    font-style: italic; /* 시스템 메시지는 기울임꼴로 */
}

#chatInputContainer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #7f8c8d;
}
#chatInputField {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #95a5a6;
    border-radius: 5px;
    background-color: #34495e;
    color: white;
}
#chatSendButton {
    margin-left: 10px;
    padding: 8px 15px;
}
/* ✨ [추가] 채팅 탭 관련 스타일 */
#chatTabs {
    display: flex;
    background-color: #34495e;
    padding: 5px;
    border-bottom: 1px solid #7f8c8d;
}

.chat-tab {
    flex-grow: 1;
    padding: 8px;
    background-color: transparent;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.chat-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.chat-tab.active {
    color: white;
    font-weight: bold;
    border-bottom: 2px solid #f1c40f;
}
/* ✨ [추가] 채팅창 소리 끄기 버튼 스타일 */
#chatMuteButton {
    background-color: transparent;
    border: 1px solid #555;
    color: white;
    border-radius: 5px;
    width: 35px;
    height: 35px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 1.2em;
}
#chatMuteButton:hover {
    background-color: #555;
}
/* ✨ [추가] 채팅창 알림 효과 */

/* 빛나는 애니메이션 정의 */
/* ✨ [수정] 더 밝고 강렬한 색상으로 애니메이션 변경 */
@keyframes chat-glow {
    0% {
        box-shadow: 0 0 5px rgba(231, 76, 60, 0.7);
        transform: scale(1);
    }
    50% {
        /* 눈에 확 띄는 빨간색으로 변경하고, 그림자를 더 넓게 퍼지게 합니다. */
        box-shadow: 0 0 30px 10px rgba(231, 76, 60, 1);
        transform: scale(1.1); /* 살짝 커지는 효과 추가 */
    }
    100% {
        box-shadow: 0 0 5px rgba(231, 76, 60, 0.7);
        transform: scale(1);
    }
}

/* ✨ [수정] 애니메이션을 무한 반복하도록 변경 */
#chatToggleButton.new-message-glow {
    /* 1초 동안 무한히 반짝입니다. */
    animation: chat-glow 1s infinite;
    border-color: #e74c3c;
}
.chat-delete-button {
    display: inline-block; /* 항상 보이도록 설정 */
    color: #ff6b6b; /* 눈에 띄는 빨간색 계열 */
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}
.chat-delete-button:hover {
    color: #ff0000; /* 마우스를 올리면 더 진한 빨간색으로 */
}

/* 내가 쓴 메시지나 관리자일 때만 보이도록 설정 */
.chat-message.can-delete .chat-delete-button {
    display: inline;
}

/* 타겟/채팅 아이콘 버튼 공통 스타일 */
.ui-icon-button {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 10px;
    cursor: pointer;
    position: fixed;
    z-index: 9998;
    transition: background-color 0.3s;
}
.ui-icon-button:hover {
    background: rgba(0,0,0,0.8);
}
.ui-icon-button img {
    width: 100%;
    height: 100%;
}

/* 타겟 버튼 위치 (채팅 버튼 옆) */
#targetSelectButton {
    bottom: 25px;
    left: 100px; /* #chatToggleButton의 left가 20px라고 가정 */
}

/* 타겟 목록 스타일 */
#targetListContainer {
    max-height: 40vh;
    overflow-y: auto;
    margin-top: 10px;
}
.target-user-entry {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #444;
}
.target-user-entry:last-child {
    border-bottom: none;
}
.target-user-info {
    flex-grow: 1;
}
.target-user-info .name {
    font-weight: bold;
}
.target-user-info .details {
    font-size: 0.8em;
    color: #ccc;
}
.select-target-btn {
    /* ✨[핵심] !important를 추가하여 다른 스타일이 덮어쓰지 못하게 합니다. */
    width: auto !important;
    padding: 10px 15px !important; /* 매우 작게 조절하여 변화를 확실히 확인 */
    font-size: 0.9em !important;
    background-color: #e74c3c !important; /* 빨간색 계열로 강제 지정 */
    
    /* --- 나머지 스타일 --- */
    color: white !important;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    flex-shrink: 0;
}

.select-target-btn:hover {
    background-color: #c0392b !important;
}
.target-user-info .name {
    /* 이름이 길어도 줄바꿈되지 않도록 설정 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 이름이 너무 길면 ... 으로 표시 */
}
/* ✨ [추가] 타겟 정보창 스타일 */
/* ✨ [수정] 중앙 타겟 정보 UI 스타일 */
#centralTargetInfo {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 1002;
    display: none;

    /* ✨ [추가] 붉은색 테두리 및 빛나는 애니메이션 */
    border: 2px solid #e74c3c;
    animation: target-glow 1.5s infinite alternate;
}

/* ✨ [추가] 빛나는 효과를 위한 애니메이션 정의 */
@keyframes target-glow {
    from {
        box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    }
    to {
        box-shadow: 0 0 30px 10px rgba(231, 76, 60, 1);
    }
}

#centralTargetAvatar {
    width: 120px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid white;
    margin-bottom: 10px;
    cursor: pointer; /* 공격 액션 */
    animation: moveHorizontal 2s infinite alternate; /* 좌우 움직임 애니메이션 */
}

@keyframes moveHorizontal {
    /* 이동 범위를 -25px ~ 25px로 늘립니다. */
    0% { transform: translateX(-165px); }
    100% { transform: translateX(165px); }
}

#centralTargetDetails {
    margin-bottom: 10px;
}

#centralTargetName {
    font-weight: bold;
    font-size: 1.2em;
}

#centralTargetCoins {
    font-size: 0.9em;
    opacity: 0.8;
}

#centralTargetCloseButton {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
}

#centralTargetCloseButton:hover {
    opacity: 1;
}
/* ✨ [추가] 미사일 인벤토리 및 툴팁 스타일 */
#missileInventory {
    position: fixed;
    bottom: 60px; /* 가로로 표시되므로 위치를 아래로 조정 */
    right: 150px;  /* 채팅/타겟 버튼 옆으로 위치 조정 */
    display: flex;
    /* flex-direction: column; 이 줄을 삭제하여 가로 정렬(기본값)로 변경 */
    gap: 2px;
    z-index: 9997;
    /*border: 1px solid red;*/
}

.missile-icon {
    width: 25px;
    height: 60px;
    background-image: url('../images/icons/missile.png'); /* 미사일 아이콘 이미지 */
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 0;
}
.missile-icon:hover {
    transform: scale(2.1);
}

#missileTooltip {
    position: fixed;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #f1c40f;
    font-size: 0.9em;
    pointer-events: none; /* 툴팁이 마우스 이벤트를 방해하지 않도록 함 */
    z-index: 10001;
    white-space: nowrap;
    pointer-events: none;
}
/* ✨ [추가] 미사일 연기 잔상 스타일 */
.smoke-trail {
    position: fixed;
    width: 30px; /* 연기 이미지 크기 */
    height: 30px;
    background-image: url('../images/effects/smoke.gif'); /* 연기 GIF/PNG 이미지 */
    background-size: contain;
    z-index: 9999;
    opacity: 0.7;
    pointer-events: none;
    transition: transform 1.5s, opacity 1.5s; /* 서서히 사라지는 효과 */
}
/*------------------------------------------------------------------------------------------------------------*/
/*-------------미사일 차량과 발사대 ----------------------------------------------------------------------------*/
 /* ✨ [추가] 발사대 스타일 */
/* ✨ [수정] 발사대 관련 스타일 전체 */

#launcherContainer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 50px;
    z-index: 9996;
    pointer-events: none;
}

#launcherBase {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    filter: brightness(95%);
}

/* 묶음 그룹 스타일 */
#turretWrapper {
    position: absolute;
    bottom: 5%;
    left: 50%;
    width: 180px;
    height: 150px;
    transform-origin: bottom center; /* ✨ 그룹의 회전축은 하단 중앙 */
    transition: transform 0.2s linear; /* 더 즉각적인 회전 느낌 */
    transform: translateX(-50%);
}

/* 포탑과 미사일은 이제 그룹 안에서 중앙 정렬 */
#launcherTurret, #loadedMissile {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* ✨ 각자의 정중앙을 기준으로 위치 */
    transform-origin: center center;  /* ✨ 각자의 회전축도 정중앙 */
}

#launcherTurret {
    top: 40%;
    width: 35px;
    height: 75px;
}
#loadedMissile {
    position: absolute;
    top: 40%;
    left: 50%; 
    width: 25px; /* 장전된 미사일 크기 */
    height: 85px;
    transform: translate(-50%, -50%);
    display: none; /* 평소에는 숨김 */
}
/* ✨ [추가] 장전된 미사일 데미지 표시 스타일 */
#loadedMissilePayload {
    position: absolute;
    bottom: 0px; /* 장전된 미사일 위에 위치하도록 조절 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(231, 77, 60, 0.247);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.4; /* 줄 간격 조절 */
    padding: 5px 10px; /* 여백 살짝 늘리기 */
}
/* ✨ [추가] 목록용 아바타 스타일 */
.list-avatar {
    width: 62px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #555;
    margin-right: 10px;
    vertical-align: middle; /* 이름과 세로 중앙 정렬 */
}
/* ✨ 유도 미사일은 다른 이미지로 덮어쓰기 */
.missile-icon.homing {
    background-image: url('missile_homing.png');
    /* ✨ 빛나는 효과를 필터 대신 테두리로 명확하게 표현 */
    /*border: 2px solid #f1c40f;
    /*border-radius: 10px; /* 테두리를 부드럽게 */
}
/*-----------------------------------------------------------------------------------------------
방패 관련 ui
-------------------------------------------------------------------------------------------------*/
/* 방패 버튼 위치 */
#shieldSetupButton {
    bottom: 25px;
    left: 155px; /* 타겟 버튼 옆 */
}

/* 방패 팝업창 내부 스타일 */
#myInfoContainer {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 10px auto;
    pointer-events: none; /* ✨ [추가] 컨테이너 자체는 클릭을 통과시킴 */
}
#myAvatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #f1c40f;
    position: relative; /* ✨ z-index 적용을 위해 추가 */
    z-index: 1;         /* ✨ 1번 레이어 (가장 아래) */
    pointer-events: auto; /* ✨ [추가] 아바타 이미지는 클릭을 받도록 설정 */
    cursor: pointer; /* ✨ [추가] 마우스를 올리면 손가락 모양으로 변경 */

}
#myName {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    position: relative; /* ✨ z-index 적용을 위해 추가 */
    z-index: 3;         /* ✨ 3번 레이어 (가장 위) */
}

/* 아바타 위 반투명 보호막 효과 */
.shield-effect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/effects/shield_overlay.png'); /* 방패 이미지 */
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0; /* 기본적으로 숨김 */
    transition: opacity 0.3s ease-in-out;
    background-repeat: no-repeat; /* 이미지가 반복되지 않도록 설정 */
    background-position: center;  /* 이미지를 항상 중앙에 위치 */
    background-size: contain;     /* 이미지 비율을 유지하면서 꽉 차게 표시 */
    /* ✨ [추가] 이 효과가 마우스 클릭을 통과시키도록 설정 */
    pointer-events: none;
}
.shield-effect-overlay.active {
    display: block;
    animation: shield-pulse 2s infinite;
    opacity: 0.6; /* ✨ [추가] 반투명 효과 */
    position: absolute; /* ✨ z-index 적용을 위해 추가 */
    z-index: 2;         /* ✨ 2번 레이어 (중간) */
    opacity: 0.7;
}

/* 장착 슬롯 스타일 */
#equippedShieldSlots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 20px;
    position: relative; /* ✨ z-index 적용을 위해 추가 */
    z-index: 3;         /* ✨ 3번 레이어 (가장 위) */
}
.shield-slot {
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.3);
    border: 2px dashed #555;
    border-radius: 5px;

    /* ✨ [추가] 배경 이미지 스타일 3종 세트 */
    background-repeat: no-repeat; /* 이미지가 반복되지 않도록 설정 */
    background-position: center;  /* 이미지를 항상 중앙에 위치 */
    background-size: contain;     /* 이미지 비율을 유지하면서 꽉 차게 표시 */
}

/* 반짝이는 애니메이션 */
@keyframes shield-pulse {
    0% { opacity: 0.1; }
    50% { opacity: 2; }
    100% { opacity: 0.1; }
}
/* ✨ [추가] 방패 인벤토리 스타일 */
#shieldInventory {
    position: fixed;
    bottom: 20px;
    right: 150px; /* 미사일 인벤토리 옆으로 위치 조정 */
    display: flex;
    gap: 5px;
    z-index: 10001; 
    /*border: 1px solid red;*/
}

.shield-icon {
    width: 26px;
    height: 28px;
    background-image: url('../images/icons/shield.png'); /* 방패 아이콘 이미지 */
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 0;

    /* 추가적인 스타일 (예: cursor: pointer) 은 나중에 장착 시 추가 */
}
/* ✨ [추가] 장착된 방패 표시 공용 스타일 */
.equipped-shields-display {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
}
.equipped-shield-icon {
    width: 28px;
    height: 28px;
    background-image: url('../images/icons/shield.png');
    background-size: contain;
}
#myDetails {
    text-align: center;
    margin-bottom: 15px;
}
#myCoins {
    font-size: 0.9em;
    color: #2ecc71; /* 코인 색상 */
}
.close-button {
    float: right;
    font-size: 2.8em;
    cursor: pointer;
    user-select: none; /* ✨ [추가] 텍스트로 인식되지 않도록 설정 */
}
/* ✨ [추가] 새로운 인벤토리 UI 스타일 */
#openInventoryButton {
    /* ✨ [수정] !important를 추가하여 다른 스타일 규칙을 무시하고 이 위치를 강제합니다. */
    bottom: 25px !important;
    left: 210px !important;
}

.inventory-content {
    background: #2c3e50 url('images/backgrounds/metal_texture.png'); /* 금속 질감 배경 이미지 */
    border: 3px solid #7f8c8d;
    border-radius: 10px;
    width: 90%;
    max-width: 420px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7), inset 0 0 10px rgba(0,0,0,0.5);
    color: white;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #7f8c8d;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.inventory-header h2 {
    margin: 0;
    font-size: 1.5em;
}

/* ✨ [수정] 장착칸 섹션 전체를 감싸는 컨테이너 */
.equip-section {
    position: relative !important;
    width: 280px !important;
    height: 180px !important;
    margin: 15px auto !important;
}

/* 중앙 장비 이미지 */
.equip-centerpiece {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 정중앙에 배치 */
}
.equip-centerpiece img {
    max-width: 100px;
}

/* 개별 장착 슬롯 (기본 스타일) */
.equip-slot {
    position: absolute; /* .equip-section을 기준으로 위치 지정 */
    width: 60px;
    height: 60px;
    background-color: rgba(0,0,0,0.5);
    border: 2px solid #4a4a4a;
    border-radius: 5px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #7f8c8d;
    font-size: 0.8em;
}

/* ✨ [추가] 각 슬롯의 위치를 개별적으로 지정 */
.equip-slot[data-slot-type="weapon"] {
    top: -20px;
    left: -83px;
    width: 60px;
    height: 102px;   
}
.equip-slot[data-slot-type="armor"] {
    top: -20px;
    right: -83px;
    width: 60px;
    height: 102px;   
}
.equip-slot[data-slot-type="accessory"] {
    bottom: -20px;
    left: 120px;
}
.equip-slot[data-slot-type="booster"] {
    bottom: -20px;
    right: 120px;
}
/* .equip-slot[data-slot-type="accessory2"] {
    bottom: -40px;
    left: 120px;
}
.equip-slot[data-slot-type="booster2"] {
    bottom: -20px;
    right: 120px;
} */


.inventory-section-title {
    text-align: center;
    font-weight: bold;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.inventory-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    padding: 10px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 5px;
}

.inventory-slot {
    width: 60px;
    height: 60px;
    background-color: rgba(0,0,0,0.5);
    border: 2px solid #4a4a4a;
    border-radius: 5px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
}

.inventory-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #7f8c8d;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.action-button {
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #bdc3c7;
    background-color: #34495e;
    color: white;
    cursor: pointer;
}
.action-button:hover {
    background-color: #4e6a85;
}
/*------------------------------------아래 실서드설창 아바타 변경 아래------------------------------------------------------
/* 모달 배경 */
  #avatarModal .modal-content {
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
  } 

/* 닫기 버튼 */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* 아바타가 표시될 그리드 */
#avatarGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* 그리드 안의 개별 아바타 이미지 */
#avatarGrid img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

#avatarGrid img:hover {
    border-color: #ffc107; /* 호버 시 노란색 테두리 */
}
/* ✨ [추가] 적용 중인 아이템 효과 표시줄 스타일 */
.active-effects-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: -10px; /* 사용자 정보창과의 간격 줄이기 */
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #f1c40f;
}
.effect-item {
    background-color: rgba(0,0,0,0.6);
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
}
/* ✨ [추가] 아이템 툴팁 스타일 */
.item-tooltip {
    position: fixed;
    display: none;
    background-color: rgba(0,0,0,0.85);
    color: white;
    border: 1px solid #f1c40f;
    border-radius: 5px;
    padding: 10px;
    font-size: 0.9em;
    max-width: 250px;
    z-index: 10003; /* 가장 위에 표시 */
    pointer-events: none; /* 마우스 클릭 방해 방지 */
}
.item-tooltip-name {
    font-weight: bold;
    color: #3498db;
    font-size: 1.1em;
}
.item-tooltip-desc {
    color: #bdc3c7;
    margin: 5px 0;
}
.item-tooltip-payload {
    color: #2ecc71;
}
.equip-slot.occupied span {
    display: none;
}

/* 받은 편지함 버튼 */
#openTradesButton {
    bottom: 25px !important;
    left: 270x;
}

/* 알림 뱃지 */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

/* 받은 편지함 목록 스타일 */
#tradesList {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}
.trade-entry {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #444;
}
.trade-item-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}
.trade-info {
    flex-grow: 1;
}
.trade-actions button {
    margin-left: 5px;
}

/* 아이템 보내기 팝업 스타일 */
#sendItemInfo {
    margin-bottom: 15px;
}
#receiverNameInput, #itemPriceInput {
    display: block;
    width: 90%;
    margin: 10px auto;
    padding: 8px;
}
/* ✨ [추가] 버튼과 라벨을 감싸는 wrapper 스타일 */
.button-wrapper {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px; /* 버튼 크기와 맞춤 */
}

/* ✨ [추가] 아이콘 아래 텍스트 라벨 스타일 */
.icon-label {
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
    margin-top: 2px;
    pointer-events: none; /* 라벨이 클릭을 방해하지 않도록 설정 */
}
/* ✨ [추가] 거래 중인 아이템을 비활성화시키는 스타일 */
.item-in-trade {
    opacity: 0.5;
    filter: grayscale(80%);
    cursor: not-allowed !important; /* 클릭할 수 없다는 커서 모양 */
}
/* ✨ [추가] 공격 대상 선택창 탭 스타일 */
.target-tabs {
    display: flex;
    border-bottom: 2px solid #555;
    margin-bottom: 15px;
}
.target-tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    color: #888;
    font-size: 1.1em;
    font-weight: bold;
}
.target-tab.active {
    color: #f1c40f;
    border-bottom: 2px solid #f1c40f;
}

/* ✨ [추가] 탭 컨텐츠 기본 스타일 */
.target-content {
    display: none; /* 기본적으로 모든 컨텐츠를 숨김 */
}
.target-content.active {
    display: block; /* active 클래스가 붙은 컨텐츠만 표시 */
}
