 body {
            font-family: 'Roboto', Arial, sans-serif;
            background: #e9ecef;
            color: #333;
            padding: 20px;
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .form-container {
            background: white;
            padding: 50px;
            border-radius: 12px;
            max-width: 800px;
            width: 100%;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            color: #007bff;
            font-size: 2em;
            margin-bottom: 10px;
            font-weight: 700;
        }

        h3 {
            text-align: center;
            color: #333;
            font-size: 1em;
            margin-bottom: 30px;
            font-weight: 400;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #333;
            font-weight: 600;
            font-size: 14px;
        }

        .input-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .input-group {
            flex: 1;
        }

        .input-group input,
        .input-group select {
            width: 100%;
            padding: 12px;
            border: 1px solid #007bff;
            border-radius: 8px;
            font-size: 14px;
            background: #f8f9fa;
            box-sizing: border-box;
        }

        .input-group input:focus,
        .input-group select:focus {
            border-color: #0056b3;
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
            outline: none;
        }

        .gender-group {
            margin-bottom: 20px;
        }

        .gender-group label {
            display: inline-flex;
            align-items: center;
            margin-right: 20px;
            color: #333;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
        }

        .gender-group input[type="radio"] {
            margin-right: 8px;
            accent-color: #007bff;
            transform: scale(1.2);
        }

        button {
            background: #007bff;
            color: white;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: block;
            margin: 20px auto;
            transition: background-color 0.3s ease, transform 0.2s ease;
        }

        button:hover {
            background: #0056b3;
            transform: translateY(-2px);
        }

        button:disabled {
            background: #6c757d;
            cursor: not-allowed;
            transform: none;
        }

        #pledgeSection,
        #certificateSection {
            display: none;
            margin-top: 20px;
            background: #0056b3;
            padding: 90px;
            border-radius: 12px;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
            color: white;
            text-align: center;
            max-width: 800px;
            width: 100%;
        }

        #pledgeSection h2,
        #certificateSection h2 {
            color: white;
            font-size: 1.7em;
            margin-bottom: 20px;
        }

        #pledgeText {
            color: white;
            font-size: 18px;
            line-height: 1.6;
            max-width: 800px;
            margin: 0 auto;
            overflow: hidden;
            padding: 5px;
            box-sizing: border-box;
            word-wrap: break-word;
        }

        #certificateSection p {
            color: white;
            font-size: 16px;
            margin: 15px 0;
        }
        .certificate-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.certificate-img {
    max-width: 100%;
    border-radius: 8px;
}

.certificate-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.icon-btn {
    background: #fff;
    color: #007bff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: #007bff;
    color: #fff;
}
.error-message {
  color: red;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}
#formError {
  display: none; /* default hidden */
  background-color: #fdecea; /* light red background */
  border: 1px solid #f5c2c0; /* soft red border */
  color: #b71c1c; /* dark red text */
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 14px;
  font-family: Arial, sans-serif;
}
#formError::before {
  content: "⚠ Error: ";
  font-weight: bold;
}


 @media (max-width: 600px) {
     .input-row {
 flex-direction: column;
     gap: 15px;
}
  }