
/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 30px 40px;
    box-sizing: border-box;
}

header {
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0;
}

header p {
    font-size: 1.1em;
    color: #7f8c8d;
}

/* Upload Section */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

#file-input {
    display: none;
}

.file-label {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    text-align: center;
}

.file-label:hover {
    background-color: #2980b9;
}

/* Results Section */
.results-container {
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
}

.result-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for responsive layout */
    gap: 40px;
}

.image-column, .validation-column {
    flex: 1;
    min-width: 300px; /* Minimum width before wrapping */
}

.image-column h2, .validation-column h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
}

#result-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
#results-table {
    width: 100%;
    border-collapse: collapse;
}

#results-table th, #results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
}

#results-table th {
    background-color: #ecf0f1;
    font-weight: bold;
    color: #34495e;
}

#results-table tr:last-child td {
    border-bottom: none;
}

.status-pass {
    color: #27ae60;
    font-weight: bold;
}

.status-fail {
    color: #c0392b;
    font-weight: bold;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Spinner */
.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

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

/* Error Message */
.error-message {
    text-align: center;
    color: #c0392b;
    font-size: 1.2em;
    padding: 20px;
    background-color: #fbeaea;
    border: 1px solid #e4b1b1;
    border-radius: 5px;
}

/* --- Responsive Design --- */

/* For tablets and smaller desktops */
@media (max-width: 992px) {
    .result-content {
        flex-direction: column; /* Stack columns vertically */
    }
}

/* For mobile phones */
@media (max-width: 576px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    header h1 {
        font-size: 2em;
    }
    .file-label {
        padding: 10px 15px;
    }
    #results-table th, #results-table td {
        padding: 8px 10px;
    }
}
