:root {
    --primary-color: #007bff;
    --primary-color-darker: #0056b3;
    --secondary-color: #6c757d;
    --secondary-color-darker: #545b62;
    --background-color: #f8f9fa;
    --foreground-color: #ffffff;
    --text-color-dark: #343a40;
    --text-color-light: #495057;
    --border-color: #ced4da;
    --success-color: #28a745;
    --success-color-light: #d4edda;
    --error-color: #dc3545;
    --error-color-light: #f8d7da;
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --border-radius-base: 0.25rem;
    --box-shadow-small: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);
    --box-shadow-medium: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--font-family-base);
    line-height: 1.7;
    padding: 2rem;
    background-color: var(--background-color);
    color: var(--text-color-light);
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    background-color: var(--foreground-color);
    padding: 2rem 2.5rem;
    border-radius: var(--border-radius-base);
    box-shadow: var(--box-shadow-medium);
}

h1 {
    text-align: center;
    color: var(--text-color-dark);
    margin-bottom: 2.5rem;
    font-weight: 700;
    font-size: 2.25rem;
}

.text-area-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .text-area-container {
        grid-template-columns: 1fr 1fr;
    }
}

.text-area-wrapper {
    background: var(--foreground-color);
    padding: 1.25rem;
    border-radius: var(--border-radius-base);
    box-shadow: var(--box-shadow-small);
    border: 1px solid var(--border-color);
}

.text-area-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color-dark);
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base);
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color-light);
    background-color: var(--foreground-color);
    transition: border-color 0.2s ease-in-out;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.buttons-container {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}

button {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: var(--border-radius-base);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    box-shadow: var(--box-shadow-small);
}

button:active {
    transform: scale(0.98);
}

.primary-button {
    background-color: var(--primary-color);
    color: var(--foreground-color);
}

.primary-button:hover {
    background-color: var(--primary-color-darker);
}

.secondary-button {
    background-color: var(--secondary-color);
    color: var(--foreground-color);
}

.secondary-button:hover {
    background-color: var(--secondary-color-darker);
}

.alert {
    padding: 1.1rem 1.5rem;
    border-radius: var(--border-radius-base);
    margin-bottom: 1.5rem;
    display: none;
    font-weight: 500;
    border-left: 5px solid transparent;
}

.alert-error {
    background-color: var(--error-color-light);
    color: var(--error-color);
    border-color: var(--error-color-light);
    border-left-color: var(--error-color);
}

.alert-success {
    background-color: var(--success-color-light);
    color: var(--success-color);
    border-color: var(--success-color-light);
    border-left-color: var(--success-color);
}


.loading-spinner {
    display: none;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.fade-in {
    animation: fade-in 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}
