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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.6;
}

.card {
    border: 1px solid #ddd;
    padding: 24px;
    margin-bottom: 24px;
    background: #fff;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-header h2,
.result-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-header p,
.result-header p {
    font-size: 13px;
    color: #666;
}

textarea {
    width: 100%;
    min-height: 180px;
    border: 1px solid #ccc;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
}

textarea:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    justify-content: center;
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    border-color: #000;
}

.feedback-message {
    min-height: 20px;
    font-size: 13px;
    color: #b30000;
    margin-bottom: 12px;
}

.feedback-message.success {
    color: #1a7f37;
}

.result-section .result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.result-output {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 16px;
    min-height: 160px;
    max-height: 320px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

@media (max-width: 640px) {
    .card {
        padding: 20px;
    }

    .section-header,
    .result-section .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-actions,
    .file-actions {
        width: 100%;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}
