body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.upload-section {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

input[type="number"] {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 5px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(45deg, #28a745, #20a142);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(45deg, #20a142, #1e8e3e);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(45deg, #138496, #117a8b);
}

.results {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.plot-container {
    text-align: center;
    margin-top: 20px;
}

.plot-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.header-content {
    background-color: #f1f1f1;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.data-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.data-card {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.data-card h4 {
    margin-top: 0;
    color: #333;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

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

.auth-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.source-section {
    margin-bottom: 20px;
}

.webdav-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
}

.file-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    margin-bottom: 15px;
}

.file-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:hover {
    background-color: #f0f0f0;
}

.file-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: bold;
    color: #333;
}

.file-meta {
    font-size: 12px;
    color: #666;
}

.btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Download buttons section */
.download-buttons {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.download-buttons button {
    margin: 0 10px;
}

.download-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.qc-plot-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none; /* Initially hidden */
}

.file-list-info {
    padding: 20px;
    color: #999;
    text-align: center;
}