body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.panel {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.panel-title {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

textarea {
    position: relative;
    box-sizing: border-box;
    margin: 0 auto;
    min-width: 100%;
    min-height: 12vh;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    background: white;
}

textarea#outputHtml {
    min-height: 55vh;
}

.output-container {
    overflow-x: auto;
    white-space: pre;
    resize: vertical;
    line-height: 1.5;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

#pasteBtn {
    background: #2ecc71;
}

#pasteBtn:hover {
    background: #27ae60;
}

#convertBtn:not(:disabled) {
    animation: pulse 1.5s infinite;
}

.button-group {
    display: flex;
    gap: 10px;
}

.status {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 10px;
}

.success {
    color: #27ae60;
}

.error {
    color: #e74c3c;
}

textarea.has-content {
    border-left: 3px solid #2ecc71;
}

button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}