.pdfcont {
    font-family: sans-serif;
    padding: 2em;
    /*min-height: 590px;*/

    max-width: 1280px;
    width:95%;
    margin: 1em auto;
    background: #e7f1f3;
    border-radius: 10px;
    flex: 1;
}
#page-title {
    font-size: 4.2rem;
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #166671;
}
#page-desc {
    font-size: 2rem;
    color: #396c80;
    margin-bottom: 2em;
    margin-left: 2em;
    line-height: 1.5;
}
#page-desc a { color: #2fbdcf; text-decoration: underline; }
#controls { margin-bottom: 1.5em; font-size: 3.2rem; }
#controls button, #controls label ,select { font-size: 2.3rem; margin-left: 1rem; }
#export-btn {
    background: #18b0b0;
    color: #fff;
    font-size:2.1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: 0.38em 1.2em;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px #158a901c;
    transition: background 0.15s;
}
#export-btn:hover {
    background: #15697b;
    color: #fff;
}

/* 拖曳區 */
#drop-zone {
    border: 2px dashed #1ea6a3;
    border-radius: 10px;
    padding: 0.5em 1em;
    margin-bottom: 2em;
    text-align: center;
    background: #e0f8fa;
    color: #167a8d;
    font-size: 2.5rem;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}
#drop-zone.hover {
    border-color: #15697b;
    background: #c1edf5;
}

/* 預覽區（高度自適應，橫直圖都正常） */
#preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 20px;
    justify-content: flex-start;
    margin-top: 1em;
    margin-bottom: 1em;
  /*  min-height: 96px;*/
}

/* .page-thumb（只給功能頁，不給共用） */
.page-thumb {
    background: #f5fcfd;
    border: 1.2px solid #147d8e38;
    border-radius: 8px;
    box-shadow: 0 1px 6px #13768a24;
    position: relative;
    padding: 1.1em 0.7em 0.9em 0.7em;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    min-height: 0;
   /* max-width: 320px;*/
    word-break: break-all;
    overflow: visible;
}
.page-thumb canvas {
    display: block;
   /* max-width: 200px;*/
  /*  max-height: 230px;*/
  /*  width: auto;
    height: auto;*/
    border-radius: 5px;
    background: #e9f5f7;
    margin-bottom: 0.6em;
    object-fit: contain;
    box-shadow: 0 0 5px #138d8e0d;
}

/* 按鈕（旋轉/刪除，功能頁獨有） */
.page-thumb .page-number {
    font-size: 1.18em;
    color: #15737e;
    margin-top: 0.5em;
    margin-bottom: 0.25em;
    font-weight: bold;
    letter-spacing: 1px;
}
.page-thumb .delete-btn,
.page-thumb .rotate-btn {
    position: absolute;
    top: 8px;
    font-size: 1.2em;
    padding: 4px 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 2px;
    transition: background 0.13s, color 0.13s;
    outline: none;
    z-index: 2;
    opacity: 0.92;
}
.page-thumb .delete-btn {
    right: 8px;
    background: #fbe7eb;
    color: #d23232;
    font-weight: bold;
}
.page-thumb .delete-btn:hover {
    background: #e40032;
    color: #fff;
}
.page-thumb .rotate-btn {
    left: 8px;
    background: #d8f2f2;
    color: #167a8d;
    font-weight: bold;
}
.page-thumb .rotate-btn:hover {
    background: #167a8d;
    color: #fff;
}
.page-thumb a{
color:#396c80;

}

/* modal、canvas、input */
#img-modal .modal-content,
#pwd-modal .modal-content {
    background: #fff;
    padding: 2em;
    border-radius: 13px;
    box-shadow: 0 2px 26px #2ab8b822;
    position: relative;
    min-width: 320px;
}
#img-modal .modal-close {
    position: absolute;
    right: 18px; top: 18px;
    background: #e9f7fa;
    color: #256688;
    border: none;
    font-size: 1.1em;
    padding: 2px 14px;
    border-radius: 5px;
    cursor: pointer;
}
#img-modal .modal-close:hover {
    background: #e40032;
    color: #fff;
}
#modal-canvas {
    max-width: 90vw;
  /*  max-height: 85vh;*/
    display: block;
    margin: 0 auto;
    background: #f3f7f9;
    border-radius: 7px;
    box-shadow: 0 2px 10px #258a951c;
}
input[type="file"] {
    display: none;
}
