/* styles.css */
body {
    font-family: 'Arial', sans-serif;
    background-color: #36393f;
    color: #dcddde;
    padding: 20px;
    margin: 0;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: #2f3136;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 80vh;
    /* 전체 화면에 맞추기 */
}

h1 {
    text-align: left;
    color: #7289da;
    font-size: 24px;
    margin-bottom: 10px;
    margin-left: 5px;
}

/* 메세지 목록 */
#guestbook-entries {
    display: flex;
    flex-direction: column;
    /* 최신 메시지를 아래에 표시 */
    flex-grow: 1;
    background-color: #40444b;
    /* 배경색 설정 */
    padding: 15px;
    border-radius: 8px;
    overflow-y: scroll;
    /* 스크롤 가능 */
    margin-bottom: 10px;
    max-height: 60vh;
    min-height: 60vh;
    /* 메시지 목록에 최대 높이 제한 */
}

/* 스크롤바 스타일링 */
#guestbook-entries::-webkit-scrollbar {
    width: 10px;
    /* 스크롤바의 너비 */
}

#guestbook-entries::-webkit-scrollbar-track {
    background: #2f3136;
    /* 스크롤바 배경 */
    border-radius: 10px;
    /* 모서리 둥글게 */
}

#guestbook-entries::-webkit-scrollbar-thumb {
    background-color: #1b1c1f;
    /* 스크롤바 핸들 색상 */
    border-radius: 10px;
    /* 모서리 둥글게 */
}

#guestbook-entries::-webkit-scrollbar-thumb:hover {
    background-color: #24272b;
    /* 핸들을 hover할 때 색상 변화 */
}

.guestbook-layout {
    display: flex;
    /* 방명록과 사용자 목록을 나란히 배치 */
}

#user-list {
    flex: 1;
    overflow-y: scroll;
    max-height: 60vh;
    min-height: 60vh;
    padding-left: 20px;
    /* 여백 추가 */
    border-left: 1px solid #555;
    /* 경계선 추가 */
}

#user-list::-webkit-scrollbar {
    width: 0px;
    /* 스크롤바의 너비 */
}

.entry {
    display: flex;
    /* Flexbox로 수평 정렬 */
    align-items: flex-start;
    /* 프로필 이미지와 내용을 상단에 정렬 */
    background-color: #40444b;
    color: #dcddde;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}

.entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 이름과 타임스탬프를 양쪽 끝에 정렬 */
    gap: 10px;
    font-size: 14px;
    margin-bottom: 5px;
}

.entry strong {
    color: #7289da;
    font-size: 15px;
}

.entry p {
    font-size: 14px;
    margin: 5px 0 0;
    line-height: 1.4;
}

/* 입력 폼 */
form {
    display: flex;
    flex-direction: column;
}

input,
textarea {
    background-color: #40444b;
    color: #dcddde;
    padding: 12px;
    margin: 5px 0;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
    border-color: #7289da;
}

button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #7289da;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #5b6eae;
}

#userList {
    list-style-type: none;
    width: 250px;
    /* 점 없이 */
    padding: 0;
}

#userList li {
    padding: 5px;
    
    /* 항목 사이 구분선 */
}

.user-item {
    display: flex;
    align-items: center; /* 세로 정렬을 중앙으로 */
    margin-bottom: 10px;
    padding: 5px;
}

/* Modal background and positioning */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* semi-transparent dark overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    /* Ensure it’s above everything else */
}

/* Modal content box styling */
.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    background: #40444b;
    color: #dcddde;
}

#username-input,
#profile-image-input {
    margin: 10px 0;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    color: #dcddde;
    background-color: #2f3136;
}

#profile-image-selection {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0;
}

.profile-image-option {
    width: 60px;
    /* or whatever size you prefer */
    height: 60px;
    border-radius: 50%;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    /* Default border */
    transition: border-color 0.2s;
}

.profile-image-option:hover {
    border-color: #7289da;
    /* Highlight border on hover */
}

.profile-image-option.selected {
    border-color: #7289da;
    /* Highlight border when selected */
}

#name-confirm {
    padding: 10px;
    background-color: #7289da;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#confirm-name:hover {
    background-color: #5b6eae;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.timestamp {
    color: #b9bbbe;
    font-size: 13px;
    margin-left: 3px;
    /* 타임스탬프를 오른쪽 끝에 위치시킴 */
}

/* Blur effect for main content when modal is active */
.blurred {
    filter: blur(5px);
}