@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #10069F;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --muted-text-color: #888888;
    --border-color: #e0e0e0;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px;
    box-sizing: border-box;
}

.hidden-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 800px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
}

.back-link {
    text-decoration: none;
    color: var(--muted-text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.back-link i {
    font-size: 1.2rem;
}

.logo {
    max-height: 40px;
}

.main-content {
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.step-line {
    height: 2px;
    width: 50px;
    background-color: var(--border-color);
}

.step {
    background-color: var(--border-color);
    color: var(--muted-text-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active {
    background-color: var(--primary-color);
    color: white;
}

.upload-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    text-align: left;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.upload-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.upload-header p {
    margin: 5px 0 0;
    color: var(--muted-text-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--muted-text-color);
}

.upload-body .drag-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.upload-body .drag-area.dragover {
    background-color: #f0f7ff;
    border-color: var(--primary-color);
}

.drag-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.drag-area p {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.drag-area span {
    display: block;
    color: var(--muted-text-color);
    margin: 10px 0;
}

.browse-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.browse-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.supported-files {
    text-align: center;
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

.upload-footer {
    display: none;
}

.file-uploading, .upload-progress {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-info i {
    font-size: 2rem;
    color: var(--primary-color);
}

.file-details .file-name {
    font-weight: 600;
}

.file-details .file-size {
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

.delete-btn, .cancel-upload-btn, .pause-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-text-color);
}

.upload-progress {
    gap: 15px;
}

.progress-bar-container {
    flex-grow: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--primary-color);
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.progress-text {
    font-weight: 500;
}

.progress-details {
    color: var(--muted-text-color);
    font-weight: bold;
}

.progress-controls {
    display: flex;
    gap: 10px;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cancel-btn, .next-btn {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    border: 1px solid;
}

.cancel-btn {
    background-color: #f0f0f0;
    border-color: #dcdcdc;
    color: #555;
}

.next-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Progress animation for processing */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.fa-spinner {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(359deg); }
}

/* Task List Styles */
.task-list {
    margin-bottom: 30px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.task-item.processing {
    background-color: #f0f7ff;
    border-color: var(--primary-color);
}

.task-item.completed {
    background-color: #f0fff4;
    border-color: #28a745;
}

.task-item.completed .task-title {
    color: var(--muted-text-color);
}

.task-item.completed .task-status {
    color: #28a745;
    font-weight: 600;
}

.task-icon {
    margin-right: 15px;
    width: 24px;
    text-align: center;
}

.task-icon i {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.task-item.processing .task-icon i {
    color: var(--primary-color);
}

.task-item.completed .task-icon i {
    color: #28a745;
}

.text-muted {
    color: var(--muted-text-color) !important;
}

.task-details {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-title {
    font-weight: 600;
    color: var(--text-color);
}

.task-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-text-color);
}

.overall-progress {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.overall-progress .progress-bar-container {
    margin-bottom: 15px;
}

.overall-progress .progress-bar {
    transition: width 0.4s ease-in-out;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
}

.completed-text {
    color: #28a745;
    font-weight: bold;
}

/* Completion Screen Styles */
.completion-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 1rem;
}

.summary-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.summary-item strong {
    color: var(--text-color);
}

.summary-item span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.download-btn {
    font-size: 1.1rem;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.download-btn:hover {
    background-color: #0d057a;
    transform: translateY(-2px);
}

.download-btn:active {
    transform: translateY(0);
}