/* GŁÓWNE ZMIENNE KOLORYSTYCZNE */
:root {
    --primary-color: #1abc9c;
    --primary-hover: #16a085;
    
    /* Ciemne tła (Dark Mode) */
    --dark-bg: #121212;
    --container-bg: #1e1e24;
    
    /* Tło pod głównymi pytaniami (jasny pastelowy czerwony) */
    --red-bg: #fff3f3;
    --red-border: #ffcccc;
    --red-legend: #e74c3c;
    
    /* Tło pod ZUS (limonka/mięta) */
    --lime-bg: #f2fbf9;
    --lime-border: #1abc9c;
    
    /* Tło informacyjne po wysłaniu (elegancki błękit) */
    --info-blue-bg: #edf5fa;
    --info-blue-border: #3498db;
    
    /* Teksty */
    --light-text: #f0f0f5;
    --dark-text: #2c3e50;
    --input-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #2b2b36 0%, #1a1a24 100%);
    color: var(--light-text);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    margin: 0;
    min-height: 100vh;
    font-size: 18px; /* <-- ZWIĘKSZONA BAZOWA CZCIONKA O +2px */
}

.form-container {
    background: var(--container-bg);
    padding: 50px; /* Zwiększony margines wewn. dla lepszego oddechu */
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    max-width: 1000px; /* <-- POSZERZONE OKNO GŁÓWNE (z 800 na 1000) */
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-color);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h1 {
    color: var(--light-text);
    margin-bottom: 10px;
    font-size: 2.3em;
    font-weight: 700;
}

.form-header p {
    color: #a0a0b0;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 90%;
    font-size: 1.05em;
}

/* Wewnątrz jasnych fieldsetów wszystkie teksty muszą być ciemne */
fieldset label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 1.05em; /* Powiększone etykiety */
}

.help-text {
    display: block;
    font-size: 0.9em; /* Powiększony tekst pomocniczy */
    color: #555566;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* POLA FORMULARZA */
input[type="text"], input[type="tel"], input[type="email"],
input[type="date"], input[type="time"], input[type="number"], select, textarea {
    width: 100%;
    padding: 14px 15px; /* Delikatnie wyższe pola dla większej czcionki */
    margin-bottom: 22px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-size: 18px; /* <-- ZWIĘKSZONA CZCIONKA WPISYWANEGO TEKSTU O +2px */
    font-family: inherit;
    background-color: var(--input-bg);
    color: var(--dark-text);
}

input[type="text"], input[type="tel"], input[type="email"],
input[type="date"], input[type="time"], input[type="number"], textarea {
    -webkit-appearance: none;
    appearance: none;
}

/* Podświetlenie na czerwono podczas wpisywania */
input:focus, select:focus, textarea:focus {
    border-color: var(--red-legend);
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

textarea { resize: vertical; }

/* STANDARDOWY FIELDSET (Jasny czerwony) */
fieldset {
    background-color: var(--red-bg);
    border: 2px solid var(--red-border);
    border-radius: 8px;
    padding: 30px 25px 15px;
    margin-bottom: 35px;
    position: relative;
    margin-top: 20px;
}

legend {
    background-color: var(--red-legend);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.05em; /* Powiększony nagłówek sekcji */
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.row-inputs {
    display: flex;
    gap: 15px;
}

/* SEKCJA ZUS (Limonka) */
.zus-fieldset {
    background-color: var(--lime-bg);
    border: 2px solid var(--lime-border);
}

.zus-legend {
    background-color: var(--lime-border);
    box-shadow: 0 3px 10px rgba(26, 188, 156, 0.3);
}

.zus-info {
    font-size: 1em; /* Powiększony tekst info ZUS */
    color: var(--dark-text);
    line-height: 1.5;
    margin-bottom: 20px;
}

.zus-select {
    border-color: var(--primary-color);
    border-width: 2px;
}

/* Zmiana koloru podświetlenia dla pól w sekcji ZUS */
.zus-select:focus,
.zus-details input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2);
}

.zus-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--primary-color);
}

.zus-warning {
    font-size: 1em; /* Powiększone ostrzeżenie ZUS */
    color: #c0392b;
    margin-bottom: 15px;
    font-weight: bold;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    margin-top: 15px;
    font-size: 1.05em; /* Powiększony tekst zgody */
    cursor: pointer;
    line-height: 1.4;
    color: var(--dark-text);
}

.checkbox-label input {
    width: auto;
    margin-right: 15px;
    margin-top: 4px;
    transform: scale(1.4); /* Lekko powiększony checkbox */
}

/* PRZYCISKI */
.submit-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.2);
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.4);
}

.submit-btn:disabled {
    background: #555566;
    color: #888899;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.btn-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.btn-secondary { 
    background-color: #34495e;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1.05em;
}

.btn-secondary:hover { background-color: #2c3e50; }

.hidden { display: none !important; }

/* EKRAN KOŃCOWY W JASNYM MOTYWIE DLA KONTRASTU */
#confirmation-message {
    padding: 50px 30px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    background-color: #ffffff; 
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.success-icon {
    font-size: 65px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

#confirmation-message h2 { 
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 2em;
}

#confirmation-message p {
    color: #555566; 
    font-size: 1.15em;
    line-height: 1.6;
}

/* BŁĘKITNY BOX POD TEKSTEM "GOTOWE!" */
.info-box {
    margin: 30px 0;
    padding: 25px;
    background-color: var(--info-blue-bg); 
    border-left: 4px solid var(--info-blue-border); 
    border-radius: 0 6px 6px 0;
    text-align: left;
    color: var(--dark-text);
    line-height: 1.6;
    font-size: 1.05em;
}

.important {
    padding: 20px;
    background-color: #fff3f3; 
    border: 1px solid #ffcccc;
    border-radius: 6px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.05em;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media screen and (max-width: 800px) {
    body { padding: 20px 10px; }
    .form-container { padding: 30px 20px; }
    .form-header h1 { font-size: 2em; }
    .row-inputs { flex-direction: column; gap: 0; }
    .btn-secondary { width: 100%; }
}