/* style.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f7f9fc;
    margin: 0;
    padding: 5rem 1rem;
    color: #333;
    box-sizing: border-box;
}

/* 언어 스위처 */
.lang-switcher {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.lang-switcher button {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
}
.lang-switcher button.active {
    background-color: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

h1 { color: #0056b3; margin: 0 0 0.5rem 0; }
h2 { color: #555; font-weight: 400; font-size: 1.2rem; margin: 0 0 2rem 0; }

.image-container {
    max-width: 600px; width: 90%; margin-bottom: 2rem;
    background-color: #f0f9f4; padding: 1.5rem; border-radius: 12px;
}
.image-container img { max-width: 100%; height: auto; border-radius: 8px; }

.container {
    background: white; padding: 2.5rem 3rem; border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-align: center; width: 90%; max-width: 600px; margin-bottom: 2rem;
}

/* 드롭존 스타일 */
.file-drop-zone {
    border: 2px dashed #007bff;
    padding: 3rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s;
    background-color: #fcfdff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.file-drop-zone.drag-over {
    border-color: #0056b3;
    background-color: #e0f0ff;
}
.main-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.5rem;
}
.sub-text {
    font-size: 0.9rem;
    color: #666;
    display: block;
}

/* 버튼 그룹 스타일 */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 1.5rem;
}

/* 커스텀 파일 버튼 */
.custom-file-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}
.custom-file-btn:hover { background-color: #0056b3; }

/* 폴더 버튼 */
.custom-file-btn.folder-btn { background-color: #6c757d; }
.custom-file-btn.folder-btn:hover { background-color: #5a6268; }

input[type="file"] { display: none; }

#file-list-header {
    display: flex; justify-content: space-between; margin-top: 2rem;
    border-bottom: 2px solid #0056b3; padding-bottom: 0.5rem;
}
.hidden { display: none !important; }

ul#file-list {
    list-style: none; padding: 0; max-height: 220px; overflow-y: auto;
    border: 1px solid #ddd; border-top: none;
    text-align: left;
}
ul#file-list li {
    padding: 0.75rem 1rem; display: flex; justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.delete-btn {
    background-color: #dc3545; color: white; border: none;
    padding: 0.3rem 0.6rem; border-radius: 4px; cursor: pointer; margin-left: 10px;
    white-space: nowrap;
}

button#mergeButton {
    padding: 0.9rem; font-size: 1.1rem; color: white;
    background-color: #28a745; border: none; border-radius: 5px;
    cursor: pointer; width: 100%; margin-top: 2rem;
    font-weight: 600;
}
button#mergeButton:disabled { background-color: #ccc; cursor: not-allowed; }

#status { margin-top: 1.5rem; font-weight: bold; min-height: 1.2em; white-space: pre-wrap; }

/* 사용설명 등 기타 스타일 */
.how-to-use, .supported-files, .privacy-notice {
    width: 90%; max-width: 600px; margin-bottom: 2rem;
    padding: 2rem 2.5rem; border-radius: 8px;
    background-color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.how-to-use { background-color: #eef2f7; border: 1px solid #dce4f0; }

.browser-notice {
    margin-top: 1.5rem; padding: 1rem;
    background-color: #fff3cd; border: 1px solid #ffc107; border-radius: 6px;
}
.browser-notice p { margin: 0; font-size: 0.9rem; color: #856404; }

table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { padding: 0.8rem; border-bottom: 1px solid #eee; text-align: left; }
thead th { background-color: #f8f9fa; }
.info-text { margin-top: 1rem; font-size: 0.9rem; color: #666; }

.output-description { margin-bottom: 1rem; color: #555; }

footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #e0e0e0; text-align: center; color: #888; width: 100%; }

/* output-example 영역의 이미지가 튀어나오지 않게 수정 */
.output-example img {
    max-width: 100%;    /* 너비가 부모 요소를 넘지 않도록 제한 */
    height: auto;       /* 비율에 맞춰 높이 자동 조절 */
    border-radius: 8px; /* 모서리를 살짝 둥글게 (선택사항) */
    display: block;     /* 불필요한 하단 여백 제거 */
    margin: 1rem auto 0; /* 위쪽 여백 및 가운데 정렬 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 그림자 효과 (선택사항) */
}