:root {
    --radius: 24px;
    --violet: #8f00ff;
    --violetGlass: rgba(143, 0, 255, 0.4);
    --violetGlass1: rgba(143, 0, 255, 0.7);
    --bg: #121212;
    --bgGlass: rgba(255, 255, 255, 0.05);
    --muted: #888;
}

/* Reset Generale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    margin: 0;
}

/* 🟢 FIX AUTOFILL: Impedisce lo sfondo bianco sulla mail */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #1a1a1a inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* BOX REGISTRAZIONE */
.box {
    width: 95%;
    max-width: 550px;
    padding: 40px;
    text-align: center;
    
    /* 🟢 SPAZIATURA: 180px sopra (per la navbar) e 100px sotto */
    margin-top: 180px;
    margin-bottom: 100px; 
    z-index: 1;
}

.box h1 {
    color: white;
    margin-bottom: 35px;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* LAYOUT RIGHE */
.info {
    display: flex;
    gap: 20px;
    width: 100%;
}

.inputBox {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 25px; /* Spazio tra le righe di input */
    flex: 1;
}

/* STILE PER IL MENU A TENDINA (SELECT) */
.inputBox select {
    background-color: var(--bgGlass);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    appearance: none; /* Rimuove la freccetta predefinita del browser */
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

.inputBox select:focus {
    outline: none;
    border-color: var(--violet);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(143, 0, 255, 0.2);
}

/* Stile per le opzioni dentro il menu (per i browser che lo supportano) */
.inputBox select option {
    background-color: #1a1a1a; /* Sfondo scuro per la tendina aperta */
    color: white;
    padding: 10px;
}

/* FIX PER IL TELEFONO: Prefisso più stretto */
.prefisso-container {
    flex: 0.3 !important; /* Occupa meno spazio rispetto al numero */
}

.inputBox span {
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    font-weight: 700;
}

.inputBox input {
    background-color: var(--bgGlass);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.inputBox input:focus {
    outline: none;
    border-color: var(--violet);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(143, 0, 255, 0.2);
}

/* DATA DI NASCITA */
.birth-inputs {
    display: flex;
    gap: 12px;
    width: 100%;
}

.birth-inputs input {
    text-align: center;
    flex: 1;
}

/* RIMUOVERE FRECCETTE */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* BOTTONE */
.Login {
    background-color: var(--violet);
    border: solid 2px var(--violet);
    padding: 16px;
    margin: 10px 0 25px 0;
    width: 100%;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: white;
    transition: 0.3s;
}

.Login:hover {
    background-color: var(--violetGlass1);
    transform: scale(1.01);
}

/* LINKS */
.links {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
}

.links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
}

.links a:hover { color: var(--violet); }

/* 🟢 FOOTER FIX */
footer {
    margin-top: auto; /* Spinge il footer in fondo */
    width: 100%;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #555;
    background: var(--bg);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .info { flex-direction: column; gap: 0; }
    .box {
        margin-top: 130px;
        margin-bottom: 50px;
        padding: 30px 20px;
    }
    .box h1 { font-size: 32px; }
}

/* Fix specifico per la freccetta del select */
.inputBox select {
    cursor: pointer;
    /* Aggiungiamo una freccetta bianca stilizzata come sfondo */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 18px !important;
    padding-right: 40px !important; /* Spazio per non sovrapporre il testo alla freccia */
}
