body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    padding: 30px;
    display: flex;
    justify-content: center;
}

.card {
    width: 100%;
    max-width: 640px;
    background-color: #fefefe;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 2rem 0;
}

.card h2 { margin-bottom: 1.5rem; color: #333; }
label { font-weight: bold; display: block; margin: 15px 0 5px; }

input[type="text"],textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

#messageInput {
    resize: none;
    min-height: 90px;
}

button {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

button:hover { opacity: 0.8; }
button:disabled { background-color: #ccc; cursor: not-allowed; }

.danger-btn { background-color: #dc3545; }
.neutral-btn { background-color: #6c757d; }

.flag-btn {
    background: none;
    border: 2px solid #eee;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    padding: 0;
}

.flag-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.progress-bar-container {
    width: 100%;
    background: #eee;
    border-radius: 6px;
    margin-top: 20px;
    height: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #28a745;
    transition: width 0.3s, background-color 0.3s;
}

.progress-bar.error {
    background-color: #dc3545;
}

.result-message {
    display: flex;
    align-items: flex-start;
    background-color: #ffe;
    border: 1px solid #666;
    border-radius: 6px;
    color: #333;
    margin: 10px 0 0;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.4;
}

.result-message svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #007bff;
}

.result-text {
    flex-grow: 1;
    word-break: break-all;
    white-space: normal;
}

pre { 
    background: #f1f3f5; 
    padding: 8px; 
    border-radius: 4px; 
    font-size: 12px; 
    overflow-x: auto; 
    margin-top: 8px;
    border: 1px solid #e9ecef;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

#errorDetails {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}
#errorDetails div {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
#errorDetails strong {
    color: #dc3545;
    display: block;
    margin-top: 5px;
}

pre { background: #f8f9fa; padding: 8px; border-radius: 4px; font-size: 12px; overflow-x: auto; }
