* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000000; /* Changed to black */
    background-color: #f0f2f5; /* Slightly adjusted background */
    margin: 0;
    padding: 1rem 0; /* Add some padding to body for scroll */
}

.container {
    width: 90%; /* Use percentage for better responsiveness */
    max-width: 1200px; /* Max width for large screens */
    margin: 2rem auto; /* Centered with more margin */
    padding: 2rem;
    background-color: #ffffff; /* White background for container */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Softer shadow */
}

header {
    text-align: center;
    margin-bottom: 2.5rem; /* Increased margin */
    border-bottom: 1px solid #e0e0e0; /* Separator line */
    padding-bottom: 1.5rem;
}

header h1 {
    color: #1a237e; /* Darker, more professional blue */
    margin-bottom: 0.5rem;
    font-size: 2.5rem; /* Larger heading */
}

header p {
    color: #555555; /* Darker gray for better readability */
    font-size: 1.1rem;
}

.sls-warning {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.sls-warning h3 {
    color: #2e7d32;
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sls-warning p {
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.sls-warning details {
    margin-top: 1rem;
}

.sls-warning summary {
    cursor: pointer;
    font-weight: 600;
    color: #1976d2;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.sls-warning summary:hover {
    color: #0d47a1;
}

.warning-content {
    padding: 1rem 0;
}

.warning-content h4 {
    color: #2e7d32;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.warning-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 0;
}

.warning-content li {
    margin: 0.3rem 0;
    line-height: 1.5;
}

.warning-content p {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 0.75rem;
    margin: 1rem 0 0 0;
    color: #856404;
}

.file-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* Increased gap */
    margin-bottom: 1.5rem;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.6rem 1.2rem; /* Increased padding */
    background-color: #e9ecef; /* Lighter gray */
    border: 1px solid #ced4da; /* Subtle border */
    border-radius: 6px; /* Slightly more rounded */
    cursor: pointer;
    font-weight: 600;
    color: #495057; /* Darker text for inactive tabs */
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.tab-btn:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tab-btn.active {
    background-color: #007bff; /* Standard Bootstrap primary blue */
    color: white;
    border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.input-sections {
    margin-bottom: 2rem; /* Increased margin */
}

.input-section {
    display: none;
    margin-bottom: 1.5rem;
}

.input-section.active {
    display: block;
}

label {
    display: block;
    margin-bottom: 0.75rem; /* Increased margin */
    font-weight: 600;
    color: #333333; /* Darker label text */
    font-size: 1rem;
}

textarea {
    width: 100%;
    height: 350px; /* Increased height */
    padding: 1rem; /* Increased padding */
    border: 1px solid #ced4da; /* Standard border color */
    border-radius: 6px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; /* Better monospace stack */
    font-size: 0.95rem; /* Slightly larger monospace font */
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075), 0 0 0 0.2rem rgba(0,123,255,.25);
}

textarea.dragover {
    border-color: #007bff; /* Highlight with primary color */
    background-color: #e9f5ff; /* Light blue background */
}

.actions {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 1rem; /* Consistent gap */
    margin-bottom: 2.5rem; /* Increased margin */
    align-items: center; /* Align items vertically */
}

button {
    padding: 0.8rem 1.8rem; /* Increased padding for more presence */
    border: none;
    border-radius: 6px; /* Consistent border-radius */
    cursor: pointer;
    font-weight: 700; /* Bolder font */
    font-size: 1rem; /* Slightly larger font size */
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* Subtle shadow for all buttons */
    text-transform: uppercase; /* Uppercase text for buttons */
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12); /* Enhanced shadow on hover */
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08); /* Shadow for active state */
}

.primary-btn {
    background-color: #007bff; /* Bootstrap primary */
    color: white;
}

.primary-btn:hover {
    background-color: #0069d9; /* Darker shade for hover */
}

.secondary-btn {
    background-color: #6c757d; /* Bootstrap secondary */
    color: white;
}

.secondary-btn:hover {
    background-color: #5a6268; /* Darker shade for hover */
}

#clear-btn { /* Specific styling for clear button if needed */
    background-color: #f8f9fa;
    color: #dc3545; /* Red text for clear/danger action */
    border: 1px solid #dc3545;
}

#clear-btn:hover {
    background-color: #e2e6ea;
    color: #c82333;
    border-color: #c82333;
}


#preview-section,
#result-section {
    background-color: #e9f5ff; /* Lighter blue background */
    border: 1px solid #b3d7ff; /* Border to match */
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem; /* Increased margin */
}

#preview-section h3 {
    margin-bottom: 1rem;
    color: #004085; /* Darker blue for heading */
    font-size: 1.25rem;
}

#preview-container {
    background-color: white;
    border-radius: 6px; /* Consistent border-radius */
    overflow: auto; /* Changed to auto to handle potential overflow better */
    margin-bottom: 1rem;
    border: 1px solid #ced4da; /* Add border to preview container */
    min-height: 200px; /* Minimum height for preview */
}

#result-section {
    text-align: center;
}

.result-info { /* This is hidden now, but keeping styles for potential future use */
    margin-bottom: 1rem;
    color: #004085;
}

#filename-display { /* This is hidden now */
    font-family: monospace;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    border: 1px solid #b3d7ff;
    display: inline-block;
}

.download-btn { /* This is hidden now, but keeping styles */
    display: inline-block;
    background-color: #28a745; /* Bootstrap success green */
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-btn:hover {
    background-color: #218838; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.hidden {
    display: none !important; /* Ensure hidden class always hides */
}

footer {
    margin-top: 4rem; /* Increased margin */
    text-align: center;
    color: #6c757d; /* Standard gray for footer text */
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0; /* Separator line for footer */
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #007bff; /* Blue for links */
    text-decoration: none;
}

footer a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem; /* Adjusted padding */
        width: 95%;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }
    header p {
        font-size: 1rem;
    }
    
    .file-type-tabs {
        justify-content: center; /* Center tabs when they wrap */
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    textarea {
        height: 250px; /* Adjusted height for mobile */
        font-size: 0.9rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch; /* Make buttons full width in column */
        gap: 0.75rem; /* Reduced gap for column layout */
    }
    
    button { /* General button styling for mobile */
        width: 100%; /* Full width for stacked buttons */
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem 0;
    }
    .container {
        padding: 1rem;
    }
    header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    header h1 {
        font-size: 1.8rem;
    }
    header p {
        font-size: 0.9rem;
    }
    label {
        font-size: 0.95rem;
    }
    textarea {
        height: 200px;
    }
    footer {
        margin-top: 2rem;
        padding-top: 1.5rem;
        font-size: 0.85rem;
    }
}
