body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

h1, h2 {
    color: #5a5a5a;
    text-align: center;
}

#certificate-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 20px auto;
}

#certificate-form div {
    margin-bottom: 15px;
}

#certificate-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#certificate-form input[type="text"],
#certificate-form input[type="email"] {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#certificate-form button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#certificate-form button:hover {
    background-color: #0056b3;
}

#certificate-form button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


#loading-indicator {
    text-align: center;
    margin-top: 15px;
    font-style: italic;
    color: #555;
}

.hidden {
    display: none;
}

.thank-you, .error {
    max-width: 500px;
    margin: 30px auto;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    opacity: 0; /* Start hidden for animation */
    transform: translateY(20px); /* Start slightly lower */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Animation */
}

.thank-you.visible, .error.visible {
    opacity: 1;
    transform: translateY(0); /* Animate to original position */
    display: block; /* Need to set display back */
}


.thank-you {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border: 1px solid #c3e6cb;
}

.thank-you h2 {
    color: #155724;
}

.thank-you pre {
    background-color: #e2f0e5;
    padding: 10px;
    border-radius: 4px;
    text-align: left;
    font-size: 0.9em;
    white-space: pre-wrap; /* Wrap text in pre */
    word-wrap: break-word;
}

.thank-you a {
    color: #155724;
    text-decoration: none;
    font-weight: bold;
}

.thank-you a:hover {
    text-decoration: underline;
}

.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
    border: 1px solid #f5c6cb;
}