:root {
    --blue-main: #4768AA;
    --blue-light: #5C7DC0;
    --blue-very-light: #F4F7FD;
    --gold: #F2C94C;
    --white: #ffffff;
    --gray: #6B7280;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, var(--blue-very-light), #ffffff);
    margin: 0;
    padding: 0;
    color: var(--blue-main);
}

/* kontener */
.container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

/* logo */
.logo {
    display: block;
    margin: 20px auto;
    max-width: 220px;
}

/* nagłówek */
h1 {
    text-align: center;
    color: var(--blue-main);
    margin-bottom: 30px;
}

/* karta uczestnika */
.participant {
    background: var(--white);
    border-left: 6px solid var(--gold);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(71,104,170,0.15);
    transition: 0.3s;
}

.participant:hover {
    box-shadow: 0 10px 24px rgba(71,104,170,0.25);
}

/* pola */
input, select, textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #D6DEEF;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    transition: 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(92,125,192,0.15);
}

/* checkbox */
input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* przyciski */
button {
    background: linear-gradient(135deg, var(--blue-main), var(--blue-light));
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(71,104,170,0.3);
}

/* przycisk dodaj */
button[type="button"] {
    margin-bottom: 20px;
}

/* przycisk wyślij */
button[type="submit"] {
    background: linear-gradient(135deg, var(--gold), #e6b93f);
    color: white;
    width: 100%;
    font-size: 18px;
    padding: 15px;
}

button[type="submit"]:hover {
    box-shadow: 0 8px 22px rgba(242,201,76,0.4);
}

/* checkbox sekcja regulamin */
label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--gray);
}

/* separator */
hr {
    border: none;
    height: 1px;
    background: #D6DEEF;
    margin: 25px 0;
}

/* numer uczestnika */
h3 {
    color: var(--blue-main);
    margin-bottom: 15px;
}

/* animacja pojawiania */
.participant {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* mobilne */
@media (max-width: 600px) {
    .participant {
        padding: 15px;
    }
}

.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-btn {
    background: #e74c3c;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
}

.remove-btn:hover {
    background: #c0392b;
}

select {
    appearance: none;
    background-color: white;
    border: 2px solid #4768AA;
    border-radius: 10px;
    padding: 10px;
    font-size: 14px;
    color: #4768AA;
    font-weight: 500;
    cursor: pointer;

    background-image: url("data:image/svg+xml;utf8,<svg fill='%234768AA' 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 10px center;
    background-size: 18px;
}

select:hover {
    border-color: #F2C94C;
}

select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(71,104,170,0.2);
}

.g-recaptcha {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

.g-recaptcha iframe {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 150, 255, 0.25);
}

button:disabled {
    background: #9ec5e8;
    cursor: not-allowed;
    opacity: 0.6;
}

button.enabled {
    background: linear-gradient(135deg, #0a58ca, #0d6efd);
    opacity: 1;
    cursor: pointer;
}

/* --- NOVÉ: ÚSPECH / LOADER --- */
.success-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80vh;
    text-align: center;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--blue-main);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-top: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
