body {
    font-family: consolas;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px #0000001a;
}

h1 {
    text-align: center;
    color: #333;
    margin-top: 20px;
}

.section {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.wave-group {
    position: relative;
    margin-bottom: 20px;
}

.wave-group .input {
    font-size: 16px;
    padding: 10px 10px 10px 5px;
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid #515151;
    background: transparent;
    box-sizing: border-box;
}

.wave-group .input:focus {
    outline: none;
}

.wave-group .label {
    color: #999;
    font-size: 18px;
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 5px;
    top: 10px;
    display: flex;
}

.wave-group .label-char {
    transition: 0.2s ease all;
    transition-delay: calc(var(--index) * .05s);
}

.wave-group .input:focus ~ .label .label-char,
.wave-group .input:valid ~ .label .label-char {
    transform: translateY(-20px);
    font-size: 14px;
    color: #5264AE;
}

.wave-group .bar {
    position: relative;
    display: block;
    width: 100%;
}

.wave-group .bar:before,
.wave-group .bar:after {
    content: '';
    height: 2px;
    width: 0;
    bottom: 0;
    position: absolute;
    background: #5264AE;
    transition: 0.2s ease all;
}

.wave-group .bar:before {
    left: 50%;
}

.wave-group .bar:after {
    right: 50%;
}

.wave-group .input:focus ~ .bar:before,
.wave-group .input:focus ~ .bar:after {
    width: 50%;
}

input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.gender-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.gender-button {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.gender-button:first-child {
    border-radius: 5px 0 0 5px;
}

.gender-button:last-child {
    border-radius: 0 5px 5px 0;
}

.gender-button:focus {
    background-color: #5264AE;
    color: #fff;
}

.languages label {
    display: inline-flex;
    align-items: center;
    margin: 5px 0;
}

.ui-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid #d9d9d9;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.ui-checkbox::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: 0 0 0 8px #5264AE;
    border-radius: inherit;
    opacity: 0;
    transition: all 0.5s;
}

.ui-checkbox::before {
    top: 40%;
    left: 50%;
    content: "";
    position: absolute;
    width: 4px;
    height: 7px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.1s, opacity 0.1s;
}

.ui-checkbox:hover {
    border-color: #5264AE;
}

.ui-checkbox:checked {
    background: #5264AE;
    border-color: transparent;
}

.ui-checkbox:checked::before {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(1.2);
    transition: all 0.2s 0.1s;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.button {
    cursor: pointer;
    position: relative;
    padding: 10px 200px;
    font-size: 18px;
    color: #5264AE;
    border: 2px solid #5264AE;
    border-radius: 34px;
    background-color: transparent;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 170px;
    height: 80px;
    border-radius: inherit;
    scale: 0;
    z-index: -1;
    background-color: #5264AE;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.button:hover::before {
    scale: 3;
}

.button:hover {
    color: #ffffff;
    scale: 1.1;
    box-shadow: 0 0px 20px #5161a0;
}

.button:active {
    scale: 1;
}
.back-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;             /* per allineare icona + testo */
    align-items: center;
    gap: 8px;                  /* spazio tra freccia e testo */
    background: linear-gradient(to right, #3498db, #007acc);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-button:hover {
    background: linear-gradient(to right, #2980b9, #005fa3);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    text-decoration: none;
    color: white;
}

.back-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;   /* prende il colore del testo */
}
