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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

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

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

.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

#fileInput {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-label {
    display: inline-block;
    padding: 20px 40px;
    background: #f8f9fa;
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: #6c757d;
    min-width: 300px;
}

.file-label:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.file-label.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.convert-btn, .download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.convert-btn:hover, .download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
}

.convert-btn:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1.2rem;
}

.status-section {
    margin: 30px 0;
    display: none;
}

.status-section.show {
    display: block;
}

.status-message {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #495057;
}

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

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

.preview-section {
    margin: 30px 0;
    display: none;
}

.preview-section.show {
    display: block;
}

.preview-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.preview-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.preview-content h1, .preview-content h2, .preview-content h3 {
    color: #495057;
    margin: 10px 0;
}

.preview-content p {
    margin: 10px 0;
    color: #6c757d;
}

.preview-content code {
    background: #e9ecef;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.preview-content pre {
    background: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

.info-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.info-text {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.info-text:before {
    content: "ℹ️";
    font-size: 1.2rem;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
        border-radius: 15px;
    }

    .file-label {
        min-width: 250px;
        padding: 15px 25px;
    }

    .convert-btn, .download-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading .btn-icon {
    animation: spin 1s linear infinite;
}

/* Success and error states */
.status-message.success {
    color: #28a745;
    font-weight: bold;
}

.status-message.error {
    color: #dc3545;
    font-weight: bold;
}