body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
}

.compare-section {
    padding: 2rem;
    background: white;
}

.compare-container {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    min-height: 700px;
}

.compare-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea {
    flex: 1;
    min-height: 200px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    resize: none;
    outline: none;
    background: #fff;
}

.file-upload-text {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
    background: white;
    transition: 0.3s ease;
}

.file-upload-text:hover {
    background: #007bff;
    color: white;
}

.compare-actions {
    text-align: center;
    margin: 1rem 0;
}

button {
    background: #007bff;
    border: none;
    padding: 0.7rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s ease;
    color: white;
}

button:hover {
    background: #0056b3;
}

/* IMAGE PREVIEW BOX (MATCHES TEXT BOX STYLE) */
.image-preview-box {
    border: 1px solid #ccc;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    overflow: hidden;
}

.preview {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.result-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.footer {
    margin-top: auto;
    text-align: center;
    padding: 1rem;
    background: #f5f5f5;
    font-size: 0.9rem;
    color: #555;
}
.image-excel-drop-box {
    flex: 1;
    min-height: 700px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s ease;
    position: relative;
    text-align: center;
    padding: 1rem;
}

.image-drop-box:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.image-placeholder .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.browse-btn {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    background: #c6cccc;
    color: #2c2222;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
}

.browse-btn:hover {
    background: #8a8a91;
}
.preview {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}
.diff-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.diff-box {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    overflow-y: auto;
    max-height: 250px;
    line-height: 1.6;
    font-size: 0.95rem;
}
.document-container {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    height: 700px; /* taller for documents */
}

.document-container textarea {
    flex: 1;
    min-height: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    resize: none;
    overflow-y: auto;
    font-size: 0.9rem;
}

/* Reuse most styles from image compare */

.compare-container {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.excel-drop-box:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.excel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.excel-placeholder .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.preview {
    width: 100%;
    max-height: 300px;
    overflow-x: auto;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 8px;
    background: #f8f8f8;
    padding: 0.5rem;
    font-size: 0.85rem;
}
.text-area-container {
    margin: 1rem 0;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    background: #fff;
    font-family: 'Segoe UI', sans-serif;
}

.compare-actions {
    text-align: center;
    margin: 2rem 0;
}

.result-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

/* DOCUMENT DROP BOX */
.doc-drop-box {
    flex: 1;
    border: 2px dashed #ccc;
    border-radius: 12px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s ease;
    position: relative;
    text-align: center;
    min-height: 600px;
    padding: 1rem;
}

.doc-drop-box:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

/* PLACEHOLDER INSIDE DROP BOX */
.doc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.doc-placeholder .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* TEXTAREA FOR DOCUMENTS */
textarea.preview {
    width: 100%;
    height: 100%;
    min-height: 650px;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    display: none; /* hidden until upload */
    overflow-y: auto;
}

.diff-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: nowrap; /* Prevent wrapping */
}

.diff-box {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    overflow-y: auto; /* Scroll if content is too long */
    max-height: 500px; /* Fixed height */
    line-height: 1.6;
    font-size: 0.95rem;
    word-break: break-word;
    box-sizing: border-box;
}


