/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    line-height: 1.5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Upload box styles */
.upload-box {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    width: 100%;
    margin-bottom: 1.5rem;
}

#file-select-btn {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

#file-select-btn:hover {
    background-color: #1d4ed8;
}

.options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="text"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 8rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.hint {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 1.5rem;
    width: 100%;
}

.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Output container */
.output-container {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    width: 100%;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

#copy-btn {
    background-color: #10b981;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

#copy-btn:hover {
    background-color: #059669;
}

pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Footer */
.footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 36rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* -------------------------------------------------------------------------------------------------------------------------------------- */

/* ... (your existing CSS) ... */

/* Upload box styles */
.upload-box {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex; /* Added for better layout control */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center items like the process button */
}

.file-selection-area {
    display: flex;
    align-items: center;
    margin-bottom: 1rem; /* Space below file selection */
    width: 100%; /* Make it take available width */
    justify-content: flex-start; /* Align items to the start */
}

#file-name-display {
    margin-left: 10px;
    font-style: italic;
    color: #4b5563; /* A slightly muted color */
    flex-grow: 1; /* Allow it to take remaining space */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#file-select-btn {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
    flex-shrink: 0; /* Prevent button from shrinking */
}

#file-select-btn:hover {
    background-color: #1d4ed8;
}

.options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem; /* Space below options before process button */
    width: 100%;
    justify-content: center;
}

#process-btn {
    background-color: #10b981; /* Green button */
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
    margin-top: 0.5rem; /* Small space if options are above */
}

#process-btn:hover:not(:disabled) {
    background-color: #059669;
}

#process-btn:disabled {
    background-color: #9ca3af; /* Gray when disabled */
    cursor: not-allowed;
}

/* Copy button subtle feedback */
#copy-btn.copied {
    background-color: #047857; /* Darker green */
}

/* ... (rest of your CSS) ... */