/* 기본 스타일 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #1c1e21;
}

main {
    width: 100%;
    max-width: 600px;
}

/* 갤러리 영역 */
.gallery-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    position: relative; /* 관리자 버튼 위치 기준 */
}

.image-container {
    width: 100%;
    height: 400px; /* 이미지 컨테이너 높이 고정 */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 이미지가 컨테이너를 벗어나지 않도록 */
    border-radius: 6px;
    background-color: #e9ebee;
}

#random-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 이미지 비율 유지 */
    border-radius: 4px;
}

/* 버튼 스타일 */
button {
    background-color: #1877f2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #166fe5;
}

#admin-mode-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #6c757d;
    font-size: 12px;
    padding: 6px 10px;
}

#admin-mode-btn:hover {
    background-color: #5a6268;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover {
    color: #333;
}

#admin-code-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* 관리자 패널 스타일 */
#admin-panel {
    margin-top: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

#image-management-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ebee;
}

#image-management-list .delete-btn {
    background-color: #dc3545;
    font-size: 12px;
    padding: 5px 10px;
}

.upload-section {
    margin-top: 20px;
}

.notice {
    font-size: 12px;
    color: #6c757d;
    margin-top: 15px;
}
