* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #eef7f3 0%, #f6fbf9 100%);
    color: #1f2937;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    margin-top: 20px;
}

.card {
    width: 100%;
    max-width: 820px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(31, 90, 74, 0.12);
    padding: 32px;
}

h1 {
    margin: 0;
    font-size: 30px;
    text-align: center;
    color: #1f5a4a;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.subtitle {
    margin: 8px 0 28px;
    text-align: center;
    font-size: 16px;
    color: #6b7280;
}

.label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
}

textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f9fbff;
}

textarea:focus {
    border-color: #2f7d65;
    box-shadow: 0 0 0 4px rgba(47, 125, 101, 0.15);
}

.actions {
    margin-top: 18px;
    text-align: center;
}

button {
    background: #2f7d65;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

button:hover {
    background: #256b57;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    opacity: 0.85;
}

.result {
    margin-top: 24px;
    padding: 16px 18px;
    min-height: 60px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 16px;
    line-height: 1.6;
}

.result.success {
    background: #e6f4ef;
    border-color: #b7e0d2;
    color: #0f3d2e;
}

.result.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.result.loading {
    background: #edf7f3;
    border-color: #b7e0d2;
    color: #1f5a4a;
}

@media (max-width: 640px) {
    .card {
        padding: 22px;
        border-radius: 16px;
    }

    h1 {
        font-size: 28px;
    }

    textarea {
        min-height: 150px;
    }

    button {
        width: 100%;
    }
}


/* ===== Top Navigation Bar ===== */

.top-bar {
    width: 100%;
    background: #1f5a4a;   /* green */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
    color: white;
    font-size: 22px;
    font-weight: 500;
    font-family: "Segoe UI", Arial, sans-serif;
}