* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 0;
    margin: 0;
}

.topbar {
    background-color: #5b47fb;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    font-size: 22px; 
}

.topbar-links {
    display: flex;
    gap: 20px;
}

.topbar-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.topbar-links a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #1e4478;
    font-weight: 600;
}

h2 {
    color: #1e4478;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.input-section, .file-list-section, .result-section, .status-section {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Custom file input styling */
.custom-file-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-file-input input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.custom-file-input button {
    padding: 8px 15px;
    background-color: #3b74b9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.custom-file-input button:hover {
    background-color: #1e4478;
}

#selectedFolderName {
    font-style: italic;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

input[type="number"] {
    width: 70px;
}

.radio-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-group {
    margin-top: 8px;
}

button {
    padding: 10px 15px;
    background-color: #3b74b9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1e4478;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#loadFilesBtn {
    width: 100%;
    margin: 5px 0;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    background-color: #3b74b9;
}

#loadFilesBtn:hover {
    background-color: #1e4478;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.file-list p {
    color: #7f8c8d;
    font-style: italic;
}

.file-item {
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item.selected {
    background-color: #e3f2fd;
}

.result-summary {
    width: 100%;
    min-height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.status-messages {
    height: 100px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.status-message {
    margin-bottom: 5px;
    padding: 5px;
}

.status-info {
    color: #3b74b9;
}

.status-success {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

.status-warning {
    color: #ffc107;
}

.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3b74b9;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#buildSeriesBtn {
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    padding: 12px;
    background-color: #3b74b9;
    transition: background-color 0.3s;
}

#buildSeriesBtn:hover {
    background-color: #1e4478;
}

#buildSeriesBtn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.numbered-step label {
    position: relative;
}

.footer {
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 14px;
}