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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
}

header p {
    color: #7f8c8d;
}

.upload-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-hint {
    color: #95a5a6;
    margin: 1rem 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-convert {
    background-color: #28a745;
    color: white;
    margin-right: 1rem;
}

.btn-convert:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-small {
    padding: 0.4rem 1rem;
    background-color: #e9ecef;
    color: #495057;
}

.btn-small:hover {
    background-color: #dee2e6;
}

.selected-file {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    color: #7f8c8d;
    margin-left: 1rem;
}

.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.result-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.markdown-output {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: monospace;
    max-height: 500px;
    overflow-y: auto;
}

.error-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.error-message {
    text-align: center;
    color: #dc3545;
}

.error-message h4 {
    margin-bottom: 1rem;
}

.error-message p {
    margin-bottom: 1.5rem;
}

.info-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.format-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.format-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: monospace;
}

.tips {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.tips ul {
    list-style: none;
    padding-left: 0;
}

.tips li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.tips li:before {
    content: "•";
    color: #007bff;
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .result-header {
        flex-direction: column;
        gap: 1rem;
    }
}