html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
    font-family: Arial, sans-serif;

    display: flex;
    flex-direction: column;   /* 세로 흐름 */
    justify-content: center;  /* 세로 가운데 */
    align-items: center;      /* 가로 가운데 */

    /* 최신 브라우저에선 동적 뷰포트 단위 권장 */
    min-height: 100dvh;       /* 또는 100vh (iOS 주소창 이슈 있으면 100dvh 권장) */
    /*width: 100%;*/
    /*height: 100%;*/
}

.comic-font {
    font-family: 'Gloria Hallelujah', cursive;
}

.top-bar {
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 5;
}
.top-bar a {
    font-size: 16px;
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    background-color: black;
    color: white;
    border: none;
    border-radius: 5px;
    opacity: 0.8;
    text-decoration: none;
}
.top-bar a:hover{
    background-color: #0056b3;
}
.top-bar .back {
    position: absolute;
    top: 10px;
    left: 10px;
}
.top-bar .logout {
    position: absolute;
    top: 10px;
    right: 10px;
}


/* form 입력박스 */
.input-size {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 18px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

button {
    padding: 15px;
    border: none;
    border-radius: 5px;
    background-color: #0056b3;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.btn-w100 {
    width: 100%;
}
button:hover {
    background-color: #007BFF;
}


/* loading.svg */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* 반투명 배경 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all; /* 모든 이벤트를 이 요소로 제한 */
}
#overlay img {
    position: absolute;
    top: 45%;
    left: 51%;
    transform: translate(-50%, -50%); /* 중심점 기준으로 이동 */
    width: 100px;
    height: 100px;
}


/* 디버깅 토스트 메세지 */
#debug-toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.debug-toast {
    position: relative;  /* 부모인 container 기준 위치 */
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    animation: fadeInOut 3s ease-in-out forwards;
    max-width: 80vw;
    word-break: break-word;
    text-align: center;
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}


/* 저장 완료 메시지 스타일, 사용안함 */
.save-message {
    position: absolute;
    top: 20%;
    right: 10%;
    transform: translateX(-50%);
    background: rgba(0, 128, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14pt;
    font-weight: bold;
    display: none;
    z-index: 10;
}

#log-container {
    font-family: monospace;
    white-space: pre;   /* pre: 가로스크롤, pre-wrap: 줄바꿈; */
    border: 1px solid #ccc;
    box-shadow: 0 1px 6px #0001;
    padding: 12px;
    text-align: left;
    box-sizing: border-box;

    /* 부모 높이의 정확히 80% 사용 */
    /* flex-grow: 0; 남는 공간이 있어도 더 이상 커지지 않음
       flex-shrink: 0; 공간이 부족해도 절대 줄어들지 않음.
       flex-basis: 85%; flex 방향 기준으로 85% 차지. */
    /*flex: 0 0 84%;*/
    flex: 1; /* 남는 높이 모두 차지 */
    min-height: 0; /*  오버플로 방지, 내부 overflow 동작 */
    overflow: auto; /* 내용이 넘치면 스크롤만 생김 */
}


/* 최하단 페이징 버튼 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}
.pagination a {
    margin: 0 3px;
    margin-bottom: 10px;
    padding: 13px;
    border-radius: 5px;
    /*background-color: #0056b3;*/
    /*background: #d2d2d7;*/
    /*background: #6fb5ff;*/
    background: RGB(215, 215, 220);
    color: white;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
}
.pagination a:hover {
    background-color: #007BFF;
}
.pagination a.active {
    background-color: #007BFF;
}