/* General page styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: #ffffff;
    padding: 10px 20px 10px 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

header img {
    border: none;
    box-shadow: none;
}

main {
    display: flex;
    align-items: center;     
    padding: 20px 20px;
    min-height: calc(100vh - 140px); 
    box-sizing: border-box;
    flex-direction: column;
}

/* Form card */
main form {
    background-color: #fff;
    padding: 30px 35px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    margin: 0 auto; /* center horizontally */
}

/* Headings and paragraphs */
h2 {
    margin-bottom: 10px;
    font-size: 24px;
    color: #222;
}

p {
    margin-bottom: 20px;
    line-height: 1.5;
    color: #555;
}

/* Error messages */
p[style*="color: red"] {
    margin-bottom: 15px;
    font-weight: bold;
}

/* Input fields */
main form input[type="email"],
main form input[type="text"] {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background-color: #fff; /* explicit background for iOS */
}

main form input[type="email"]:focus,
main form input[type="text"]:focus {
    border-color: #4CAF50;
    outline: none;
}

/* CAPTCHA image */
img {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Button */
main form button {
    background-color: #4CAF50;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

main form button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

main form button:active {
    transform: translateY(0);
}

/* Make form responsive */
@media (max-width: 480px) {
    form {
        padding: 25px 20px;
        width: 100%;
    }
    
    header {
        padding: 15px 20px;
    }
}

/* iOS / WebKit fixes */
/* Remove iOS native input appearance */
input,
textarea,
select,
button {
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

/* Fix iOS autofill yellow background and shadow */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #111 !important;
}

/* Prevent iOS from forcing rounded search/email/text inputs */
input[type="email"],
input[type="text"],
input[type="search"],
input[type="password"] {
    -webkit-appearance: none;
    border-radius: 8px;
}

/* Remove iOS default button appearance */
button,
input[type="submit"],
input[type="button"] {
    -webkit-appearance: none;
}

