/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-color: #4A90E2; /* A modern blue */
    --primary-hover: #3A7BBF;
    --success-color: #28a745;
    --text-color: #333;
    --light-text-color: #666;
    --background-light: #f8f9fa;
    --background-medium: #e9ecef;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --container-bg: white;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 700px;
    width: 90%;
    margin: 40px auto;
    background: var(--container-bg);
    padding: 40px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border-radius: 16px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

h1 span {
    font-size: 2.8rem;
    vertical-align: middle;
    margin-right: 10px;
}

p {
    color: var(--light-text-color);
    margin-bottom: 25px;
    font-size: 1.1em;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* File Input & Drag-and-Drop Area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: #e0f2f7;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area p {
    margin: 10px 0 0 0;
    color: var(--light-text-color);
    font-weight: 500;
}

.file-upload-area .icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.file-name-display {
    margin-top: 10px;
    font-weight: 500;
    color: var(--primary-color);
}

/* Buttons */
button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    min-width: 180px;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Download Link */
a#download-link {
    display: none;
    margin-top: 30px;
    padding: 12px 24px;
    background-color: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

a#download-link:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Status Message */
#status {
    margin-top: 20px;
    font-weight: 500;
    font-size: 1.1em;
    min-height: 25px;
}

.status-loading {
    color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

.status-success {
    color: var(--success-color);
}

.status-error {
    color: #dc3545;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Loading Spinner (Optional, if you want to add a visible spinner) */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* What Next Section */
.what-next {
    margin-top: 3.5em;
    padding: 2.5em;
    background-color: var(--background-medium);
    border-radius: 16px;
    display: none;
    text-align: left;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.what-next h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    margin-top: 1em;
    justify-content: center;
}

.option {
    flex: 1 1 320px;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2em;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.option h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.option ol {
    padding-left: 20px;
    margin: 0;
    color: var(--light-text-color);
}

.option ol li {
    margin-bottom: 10px;
}

.option ol li:last-child {
    margin-bottom: 0;
}

.option code {
    background: var(--background-medium);
    padding: 3px 7px;
    border-radius: 6px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.option a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.option a:hover {
    text-decoration: underline;
}

/* NEW: Help Section Styling */
.help-section {
    margin-top: 3.5em; /* Same spacing as what-next */
    padding: 2.5em;
    background-color: var(--background-medium);
    border-radius: 16px;
    text-align: left;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.help-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.help-section .help-note {
    font-size: 0.95em;
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(74, 144, 226, 0.05); /* Light primary color background */
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    color: var(--light-text-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 30px;
        margin: 20px auto;
    }

    h1 {
        font-size: 2rem;
    }

    h1 span {
        font-size: 2.2rem;
    }

    .options {
        flex-direction: column;
        align-items: center;
    }

    .option {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h1 span {
        font-size: 2rem;
    }

    button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .file-upload-area {
        padding: 20px;
    }

    .file-upload-area .icon {
        font-size: 2.5em;
    }
}