body {
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}

textarea, .output-area {
    width: 100%;
    min-height: 250px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.output-area {
    background: white;
    overflow-y: auto;
    white-space: pre-wrap;
}

.output-area:focus {
    outline: none;
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 10px 0;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #0d6efd;
    color: white;
}

button:hover { 
    background: #0b5ed7; 
}

.stats {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
    font-family: monospace;
    white-space: pre-wrap;
}

#notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px;
    background: #198754;
    color: white;
    border-radius: 4px;
    display: none;
}

.clipboard-option {
    background: #e3f2fd;
    padding: 4px;
    border-radius: 4px;
}

.replacement {
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

.replacement.person { background: #e3f2fd; }
.replacement.place { background: #e8f5e9; }
.replacement.org { background: #fff3e0; }
.replacement.email { background: #f3e5f5; }
.replacement.url { background: #fce4ec; }
.replacement.phone { background: #ffe0b2; }
.replacement.addr { background: #f5f5f5; }

.stats .replacement {
    display: inline-block;
    margin: 2px 0;
}

.stats-legend {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.replacement.selected {
    outline: 2px solid #007bff;
    cursor: pointer;
}

.replacement:hover {
    cursor: pointer;
    opacity: 0.8;
}

.merge-controls {
    margin-top: 10px;
    text-align: center;
}

.merge-controls button {
    margin: 0 5px;
}

.merge-history {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    display: none;
}

.merge-history h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.merge-entry {
    font-family: monospace;
    margin: 5px 0;
    padding: 5px;
    background: #fff;
    border-radius: 3px;
    font-size: 13px;
}
