/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    text-align: center;
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 15px auto 0;
    border-radius: 2px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

label .optional {
    font-weight: 400;
    color: #a0aec0;
    margin-left: 5px;
    font-size: 0.85rem;
}

input, select {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background-color: white;
    color: #1a202c;
}

input:hover, select:hover {
    border-color: #cbd5e0;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

input::placeholder {
    color: #a0aec0;
}

small {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 6px;
    display: block;
}

/* Custom select arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%234a5568' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

/* Required field asterisk (in HTML, so we don't add via CSS) */

/* Submit button */
button {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 32px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    width: 100%;
    margin-top: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
    position: relative;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner for button when submitting */
button.submitting {
    color: transparent;
    pointer-events: none;
}

button.submitting::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    border: 3px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Response message */
#responseMessage {
    margin-top: 25px;
    padding: 15px 20px;
    border-radius: 16px;
    font-weight: 500;
    text-align: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

#responseMessage.error {
    background: #fff5f5;
    border-color: #fc8181;
    color: #c53030;
}

#responseMessage.success {
    background: #f0fff4;
    border-color: #9ae6b4;
    color: #276749;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 2rem;
    }

    .form-group {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    button {
        padding: 15px;
        font-size: 1rem;
    }
}

/* Optional field label styling (if you want to mark optional fields) */
label .optional {
    font-weight: 400;
    color: #a0aec0;
    font-size: 0.85rem;
}