* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-color);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #eef2ff;
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin: 0 auto 20px;
}

.upload-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.browse-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.browse-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.file-info {
    margin-top: 20px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
    margin-bottom: 20px;
}

.file-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    flex-shrink: 0;
}

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

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.remove-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: var(--error-color);
    color: white;
}

.convert-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.convert-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.convert-icon {
    width: 20px;
    height: 20px;
}

.progress-container {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.result-container {
    margin-top: 20px;
    text-align: center;
}

.success-message {
    padding: 30px;
    background: #f0fdf4;
    border-radius: 12px;
    margin-bottom: 20px;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success-color);
    margin: 0 auto 16px;
}

.success-message h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-message p {
    color: var(--text-secondary);
}

.download-btn {
    width: 100%;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.error-message {
    margin-top: 20px;
    padding: 20px;
    background: #fef2f2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid var(--error-color);
}

.error-icon {
    width: 32px;
    height: 32px;
    color: var(--error-color);
    flex-shrink: 0;
}

.error-message p {
    color: var(--error-color);
    font-weight: 500;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.9;
}

@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 24px;
    }

    .upload-area {
        padding: 40px 20px;
    }
}

