body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0; /* Reset domyślnych marginesów */
}

.form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    box-sizing: border-box; /* Zabezpieczenie przed rozpychaniem */
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
}

hr {
    border: 0;
    height: 1px;
    background: #ecf0f1;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #34495e;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-size: 16px; /* BLOKUJE ZOOM W SAFARI (iOS) */
    -webkit-appearance: none; /* USUWA NATIVE CIENIE W SAFARI (iOS) */
    appearance: none;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

legend {
    font-weight: 600;
    padding: 0 10px;
    color: #34495e;
}

/* Wygodniejsze klikanie na telefonach */
input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2); /* Lekkie powiększenie kółeczka dla palców */
}

button {
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    -webkit-appearance: none; /* Poprawia styl przycisku na iOS */
}

button:hover {
    background-color: #2980b9;
}

.hidden {
    display: none;
}

#confirmation-message {
    margin-top: 30px;
    padding: 20px;
    background-color: #e8f6f3;
    border: 1px solid #a3e4d7;
    border-radius: 5px;
    text-align: left;
}

#confirmation-message h2 {
    text-align: center;
    color: #1abc9c;
}

.important {
    margin-top: 15px;
    padding: 10px;
    background-color: #fbeee6;
    border: 1px solid #f5b7b1;
    border-radius: 4px;
    text-align: center;
    color: #c0392b;
}

/* --- OPTYMALIZACJE DLA URZĄDZEŃ MOBILNYCH (RWD) --- */
@media screen and (max-width: 480px) {
    body {
        padding: 10px; /* Zmniejszenie marginesów na zewnątrz */
    }
    
    .form-container {
        padding: 15px; /* Odzyskanie miejsca na ekranie smartfona */
    }
    
    h1 {
        font-size: 22px; /* Lżejszy nagłówek na małych ekranach */
    }
    
    fieldset {
        padding: 10px;
    }
}