@import url('modal.css');
@import url('char.css');
@import url('index.css');
@import url('common.css');

.common-h2 {
    margin-bottom: 15px;
    font-size: 22px;
    color: #d4a373;
}

.common-h2-brown {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #5e340e;
}

/* 에러 텍스트 스타일 */
.error-text {
    color: #ff5c5c;
    font-size: 14px;
    margin-top: 8px;
}

.hidden {
    display: none;
}

button {
    font-weight: bold;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem); /* 모바일~PC 가변 글자 크기 */
    padding: 0.6rem 1.2rem;  /* 좌우 여백 비례 */
    border: none;
    border-radius: 0.6rem;
    background-color: #f4a261;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}


button:hover {
    background-color: #e76f51; /* hover 색상 유지 */
}

/* 툴팁 공통 스타일 */

.tooltip-modal {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff8dc;
    border: 3px solid #d2a679;
    border-radius: 12px;
    padding: 1rem;
    width: 200px;
    z-index: 2000;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #5e340e;
}

.item-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fa6719;
}

.item-rarity {
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
}

.item-description {
    font-weight: bold;
    font-size: 0.85rem;
    line-height: 1.4;
}

.item-tooltip-close {
    margin-top: 1rem;
    background: #fa6719;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
    align-self: center;
}

.item-tooltip-close:hover {
    background: #e25c12;
}



/* 메세지 모달 스타일 */
#messageModal {
    position: fixed; /* ⭐ 모달이 위에 떠야 하므로 반드시 필요 */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999; /* 다른 모달보다 충분히 높은 값 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.4); /* 선택 사항: 뒷배경 어둡게 */
}

#messageModal.hidden {
    display: none;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffb323;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 35px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#sessionExpiredModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#sessionExpiredModal.hidden {
    display: none;
}
#sessionExpiredModal .modal-content {
    background: #fff8dc;
    border: 2px solid #5e340e;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}
#sessionExpiredModal button {
    margin-top: 12px;
    padding: 6px 16px;
    background: #fa6719;
    color: white;
    border: none;
    border-radius: 8px;
}

.session-modal-content {
    background: var(--white-color);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    width: 70%;
    max-width: 90%;
    min-height: 160px;
    box-sizing: border-box;
    position: relative;
}