/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #FFF8F3;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    background: #8B4513;
    width: 100%;
    padding: 8px 0;
    margin-bottom: 16px;
}




.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: white;
    height: 26px;
    width: 100%;
}

.logo img {
    height: 24px;
    width: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo svg {
    color: #fbbf24;
}

.logo h1 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 0.95rem;
    }

    .logo img {
        height: 24px;
        width: 24px;
    }

    .main h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 360px) {
    .logo img {
        height: 22px;
        width: 22px;
    }
    .logo h1 {
        font-size: 0.875rem;
    }
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.main h1 {
    color: #8B4513;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.main p {
    color: #D2691E;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Upload section */
.upload-section {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.upload-section h2 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed #D2691E;
    border-radius: 16px;
    padding: 4rem;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.upload-area:hover {
    border-color: #D2691E;
    background-color: #FFF8F3;
    border-style: solid;
}

.upload-area.dragover {
    border-color: #D2691E;
    background-color: #FFF8F3;
    border-style: solid;
    border-width: 3px;
}

.upload-icon {
    color: #D2691E;
    margin-bottom: 1rem;
}

.upload-icon svg {
    width: 80px;
    height: 80px;
    stroke: currentColor;
    stroke-width: 1.5;
}

.upload-area h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.upload-area p {
    margin: 0;
    color: #666;
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.4;
}

.file-info {
    color: #D2691E;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    opacity: 0.9;
}

.browse-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.browse-btn:hover {
    background: #c4611b;
}

/* File list */
.file-list {
    margin-top: 24px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.file-info-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    width: 32px;
    height: 32px;
    background: #ddd6fe;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
}

.file-details h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 2px;
}

.file-details p {
    font-size: 0.75rem;
    color: #6b7280;
}

.remove-file {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.remove-file:hover {
    background: #dc2626;
}

/* Upload controls */
.upload-settings {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-item label {
    font-weight: 500;
    color: #333;
}

.select-dropdown {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
}

.upload-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.upload-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    flex: 1;
    justify-content: center;
}

.upload-btn:hover:not(:disabled) {
    background: #059669;
}

.upload-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.clear-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.clear-btn:hover {
    background: #4b5563;
}

/* Status section */
.status-section {
    text-align: center;
    margin: 20px 0 0;
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
    width: 100%;
}

.status-message {
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 16px;
    color: #374151;
}

.status-message.success {
    color: #16a34a;
}

.status-message.success a {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.status-message.success a:hover {
    background: rgba(74, 144, 226, 0.15);
    text-decoration: underline;
}

.status-message.error {
    color: #dc2626;
}

.status-message.uploading {
    color: #3b82f6;
}

/* Progress bar */
.progress-container {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: #6b7280;
    font-size: 0.85rem;
    opacity: 0.9;
    padding: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.footer a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(74, 144, 226, 0.08);
}

.footer a:hover {
    background: rgba(74, 144, 226, 0.12);
    text-decoration: underline;
}

.footer p {
    margin: 4px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .upload-section {
        padding: 24px;
    }
    
    .upload-area {
        padding: 32px 16px;
    }
    
    .upload-area h2 {
        font-size: 1.25rem;
    }
    
    .upload-controls {
        flex-direction: column;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .file-info-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 24px 12px;
    }
    
    .upload-area h2 {
        font-size: 1.125rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 8px;
    }
}

/* Animation for file upload success */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item {
    animation: fadeIn 0.3s ease;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
