/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* ===== Site Header ===== */
.site-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== Site Footer ===== */
.site-footer {
    padding: 1rem 0;
    background: transparent;
}

.site-footer p {
    color: #4b5563;
    font-size: 0.875rem;
}

/* ===== App Container ===== */
.app-container {
    flex: 1;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: #7c3aed;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.tagline {
    color: #6b7280;
    font-size: 1rem;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
}

/* ===== Drop Zone ===== */
.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #7c3aed;
    background-color: #f5f3ff;
}

.drop-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: #7c3aed;
}

.drop-icon svg {
    width: 100%;
    height: 100%;
}

.drop-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.drop-subtext {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.browse-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.browse-btn:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ===== File List ===== */
.file-list-container {
    margin-top: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    display: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-list-container.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.file-list-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.file-count {
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.file-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
}

.file-list::-webkit-scrollbar {
    width: 6px;
}

.file-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.15s ease;
    border: 1px solid #e5e7eb;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* File type icon colors */
.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.file-icon.pdf {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.file-icon.docx {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.file-icon.unknown {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.file-icon.png,
.file-icon.jpg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: #6b7280;
}

.file-actions {
    display: flex;
    gap: 0.25rem;
}

.file-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    border: 1px solid #e5e7eb;
}

.file-action-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.file-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.file-action-btn.delete:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.file-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Actions ===== */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Status Message ===== */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.status-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-message.loading {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

/* ===== Progress bar ===== */
.progress-bar-container {
    margin-top: 0.75rem;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-icon {
        width: 48px;
        height: 48px;
    }

    .drop-text {
        font-size: 1rem;
    }

    .actions {
        flex-direction: column;
    }

    .file-name {
        max-width: 150px;
    }
}