/* ... (既存のスタイルは省略 - 前回の回答から変更なしの部分) ... */
body {
    font-family: 'Arial', 'Helvetica Neue', 'Helvetica', sans-serif; 
    line-height: 1.7; 
    margin: 0;
    padding: 0; /* bodyのpaddingを0に */
    padding-bottom: 120px; /* フッター分のスペースを確保 */
    background-color: #e9ebee; 
    color: #1d2129; 
    display: flex; /* Flexboxをbodyに適用するのは避けるか、適切に設定 */
    flex-direction: column; /*コンテンツとフッターを縦に並べる */
    align-items: center; /* 中央寄せ */
    min-height: 100vh;
    box-sizing: border-box;
}
.container {
    width: 100%;
    max-width: 760px; 
    background: #ffffff; 
    padding: 30px 40px; 
    border-radius: 12px; 
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-top: 20px; /* 上マージン */
    margin-bottom: 30px; /* 下マージン */
}
/* (中略: h1から.image-box pまでのスタイルは前回のものをベースに微調整) */

h1 {
    text-align: center;
    color: #0056b3; 
    margin-bottom: 10px; 
    font-size: 2em; 
    font-weight: 600; 
}
.subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 25px;
    font-size: 1.05em;
}
.privacy-info-button-container {
    text-align: center;
    margin-bottom: 25px;
}
.privacy-button {
    background-color: #6c757d; 
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
}
.privacy-button:hover {
    background-color: #5a6268;
}

h2 { /* 個別結果のh2スタイル */
    color: #0056b3;
    margin-top: 20px; 
    margin-bottom: 15px; 
    font-size: 1.4em; /* 少し小さく */
    border-bottom: 1px solid #e0e0e0; /* 少し細く */
    padding-bottom: 8px; 
    font-weight: 500;
}
/* Overall Status Title Style (h2タグと同じスタイルを適用する場合) */
#overallStatusTitle {
    color: #0056b3;
    margin-top: 25px;
    margin-bottom: 10px; /*メッセージとの間隔を調整*/
    font-size: 1.6em; 
    border-bottom: 2px solid #dee2e6; 
    padding-bottom: 8px; 
    font-weight: 500;
}

h3 {
    font-size: 1.2em; 
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}
.form-group {
    margin-bottom: 25px; 
}
.form-group label, .form-group .label {
    display: block;
    font-weight: 600; 
    margin-bottom: 10px; 
    color: #343a40; 
}
.form-group input[type="file"] {
    width: 100%;
    padding: 12px; 
    border: 1px solid #ced4da; 
    border-radius: 6px; 
    box-sizing: border-box;
    background-color: #f8f9fa; 
    transition: border-color 0.3s ease;
}
.form-group input[type="file"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
.radio-group label {
    margin-right: 20px; 
    font-weight: normal;
    cursor: pointer;
}
.mode-description {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 8px;
    padding-left: 20px; 
}
.slider-container {
    display: flex;
    align-items: center;
}
.slider-container input[type="range"] {
    flex-grow: 1;
    margin-right: 15px; 
    cursor: pointer;
}
#qualityValue {
    font-weight: bold;
    min-width: 30px; 
    text-align: right;
    color: #0056b3; 
}
.form-group small { 
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 8px;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 14px; 
    background-color: #28a745; 
    color: white;
    border: none;
    border-radius: 6px; 
    cursor: pointer;
    font-size: 1.1em; 
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
button[type="submit"]:hover {
    background-color: #218838;
}
button[type="submit"]:active {
    transform: scale(0.98); 
}
button[type="submit"]:disabled {
    background-color: #adb5bd; 
    cursor: not-allowed;
}

/* Status message (overall and individual) */
.status-message { /* 共通スタイルを #overallStatusMessage と #statusMessage に適用 */
    font-weight: 500; 
    margin-bottom: 18px; 
    padding: 12px 18px; 
    border-radius: 6px; 
    font-size: 1.05em;
}
.status-processing { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status-warning { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; } /* 追加: 警告用 */


/* Individual result item styles */
.result-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}
.result-item h3 { /* 個別結果のファイル名表示用 */
    font-size: 1.3em;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
    word-break: break-all;
}
/* downloadLinkContainer と previewContainer は result-item の中に移動するので、
   既存のスタイルが適用されるか、必要に応じて調整 */
.result-item .downloadLinkContainer a { /* 個別ダウンロードリンク調整 */
    display: inline-block;
    padding: 10px 18px; /* 少し小さく */
    background-color: #007bff; 
    color: white;
    text-decoration: none;
    border-radius: 6px; 
    margin-top: 10px; 
    font-size: 0.95em; /* 少し小さく */
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
.result-item .previewContainer {
    display: flex;
    justify-content: space-around; /* Space-aroundに変更 */
    margin-top: 15px; 
    gap: 15px; 
}
.result-item .image-box { /* 個別プレビューボックス */
    width: 48%;
    text-align: center;
    background-color: #fff; /* 背景を白に */
    padding: 15px; 
    border: 1px solid #e0e0e0; 
    border-radius: 6px; 
}
.result-item .image-box h4 { /* 変換前/後の小見出し */
    font-size: 1em;
    color: #555;
    margin-top: 0;
    margin-bottom: 8px;
}
.result-item .image-box img {
    max-width: 100%;
    max-height: 200px; /* 少し小さく */
    border: 1px solid #ced4da; 
    margin-top: 5px;
    object-fit: contain;
    background-color: #f8f9fa; 
    border-radius: 4px;
}
.result-item .image-box p { /* ファイル情報 */
    font-size: 0.85em; 
    color: #495057; 
    margin-top: 8px;
    word-break: break-all;
}


/* Modal Styles (変更なしのため省略) */
.modal {
    /* display: none; set by JS */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    padding-top: 60px; /* Location of the box */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 25px 35px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeInModal 0.5s;
}

@keyframes fadeInModal {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-content h2 {
    margin-top: 0;
    color: #0056b3;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.modal-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #333;
}
.modal-content ul {
    margin-bottom: 15px;
    padding-left: 25px;
}
.modal-content ul li {
    margin-bottom: 8px;
}

/* Loading Animation Styles (変更なし) */
.loading-animation {
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    margin-top: 20px;
}

.spinner {
    border: 6px solid #f3f3f3; 
    border-top: 6px solid #007bff; 
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-animation p {
    font-size: 1.1em;
    color: #007bff;
    font-weight: 500;
}

/* Footer Styles */
.site-footer {
    background-color: #343a40; /* ダークグレー */
    color: #f8f9fa; /* 明るいテキストカラー */
    padding: 25px 0;
    text-align: center;
    width: 100%;
    margin-top: auto; /* ページ下部に固定（コンテンツが少ない場合） */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}
.footer-links {
    margin-bottom: 15px;
}
.footer-link {
    color: #adb5bd; /* リンクの色 */
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.95em;
    transition: color 0.3s ease;
    display: inline-flex; /* アイコンとテキストを横並びにするため */
    align-items: center; /* アイコンとテキストを中央揃え */
}
.footer-link:hover {
    color: #f8f9fa; /* ホバー時の色 */
}
.x-icon {
    width: 20px; /* アイコンサイズ */
    height: 20px;
    fill: currentColor; /* 親要素のcolorを継承 */
    margin-right: 6px; /* アイコンとテキストの間隔 */
}
.copyright {
    font-size: 0.85em;
    color: #6c757d; /* コピーライトのテキスト色 */
}

/* ... (既存のスタイルは変更なしのため省略) ... */

/* Status message (overall and individual) */
.status-message { /* 共通スタイルを #overallStatusMessage と #statusMessage に適用 */
    font-weight: 500; 
    margin-bottom: 18px; 
    padding: 12px 18px; 
    border-radius: 6px; 
    font-size: 1.05em;
}
/* (status-processing, success, error, warning のスタイルは変更なし) */
.status-processing { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status-warning { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }


/* Bulk Download Button Style */
.bulk-download-button {
    background-color: #17a2b8; /* Info Blue */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
.bulk-download-button:hover {
    background-color: #138496;
}
.bulk-download-button:active {
    transform: scale(0.98);
}
.bulk-download-button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

/* Individual result item styles */
/* ... (以降のスタイルは変更なしのため省略) ... */
