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

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;
    color: #333;
}

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

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

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8ecff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #667eea;
}

.upload-area h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.upload-btn {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

.progress-section {
    text-align: center;
    padding: 40px 20px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    color: #667eea;
    font-size: 1.2em;
}

.result-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.result-info {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-info p {
    margin-bottom: 10px;
    color: #555;
}

.format-selection {
    margin-bottom: 30px;
}

.format-selection label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.format-selection select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.format-selection select:focus {
    outline: none;
    border-color: #667eea;
}

.preview-section {
    margin-bottom: 30px;
}

.preview-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.preview-content {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn, .reset-btn, .retry-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.download-btn {
    background: #667eea;
    color: white;
}

.download-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

.reset-btn, .retry-btn {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #ddd;
}

.reset-btn:hover, .retry-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.error-section {
    text-align: center;
    padding: 40px 20px;
}

.error-message {
    background: #ffe8e8;
    border: 2px solid #ffcccc;
    border-radius: 15px;
    padding: 30px;
}

.error-message h3 {
    color: #d32f2f;
    margin-bottom: 15px;
}

.error-message p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

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

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn, .reset-btn, .retry-btn {
        width: 100%;
        max-width: 250px;
    }
}