/* Stili specifici per la pagina di registrazione */
/* Questi stili si aggiungono a auth.css */

main {
    max-width: 600px;
    margin: auto;
}

#step2,
#step3 {
    display: none;
}

.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.input-row label {
    flex-basis: 120px;
    margin-right: 10px;
}

.input-row input {
    flex-grow: 1;
}

input {
    margin-top: 5px;
}

/* Preview immagini */
#user-image-container,
#team-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
}

#preview, 
#preview2 {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 5px;
}

#select-image,
#select-image2 {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#imm-preview,
#imm-preview2 {
    max-width: 200px;
    margin-bottom: 10px;
    border-radius: 50%;
}

/* STILI PER IL CAMPO DA CALCIO */
.campo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.campo-calcio {
    width: 300px;
    height: 400px;
    background-image: url('/imm/campetto.png'); /* Percorso assoluto */
    background-size: cover;
    background-position: center;
    border: 3px solid white;
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
}

.posizione {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid white;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.posizione .add-icon {
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.posizione.selezionato {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.posizione.selezionato .add-icon {
    display: none;
}

.posizione.selezionato img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

.posizione .player-label {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
    text-shadow: none;
}

.posizione .player-name {
    color: white;
}

.posizione .player-role {
    color: var(--rosa-elettrico);
}

.portiere { bottom: 20px; left: 50%; transform: translateX(-50%); }
.difensore { bottom: 120px; left: 50%; transform: translateX(-50%); }
.laterale-sx { bottom: 220px; left: 30px; }
.laterale-dx { bottom: 220px; right: 30px; }
.pivot { top: 40px; left: 50%; transform: translateX(-50%); }

.portiere.selezionato,
.difensore.selezionato,
.pivot.selezionato {
    transform: translateX(-50%);
}

/* Modal per selezione giocatori */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
}

.modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover { color: white; }

.players-list {
    max-height: 400px;
    overflow-y: scroll;
    margin-top: 10px;
    border-top: 2px solid white;
    border-bottom: 2px solid white;
    padding: 10px;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.3s;
}
.player-item:hover { background: rgba(255, 255, 255, 0.1); }

.player-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}
.player-info { flex-grow: 1; }

/* Panchina */
.panchina-container { margin: 30px 0; }
.panchina {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid white;
}

.panchina-slot {
    width: 60px;
    height: 60px;
    border: 2px dashed white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}
.panchina-slot:hover { transform: scale(1.1); }

.panchina-slot.selezionato {
    background: transparent;
    border: none;
    width: auto;
    height: auto;
}
.panchina-slot.selezionato img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}
.panchina-slot .add-icon { font-size: 20px; color: white; }
.panchina-slot.selezionato .add-icon { display: none; }
.panchina-slot .player-label {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
    text-shadow: none;
}

/* Logo squadra */
.posizione .logo-squadra {
    position: absolute;
    bottom: 18px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    z-index: 10;
}
.panchina-slot .logo-squadra {
    position: absolute;
    bottom: 19px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    z-index: 10;
}

/* Capitano */
.capitano-container { margin: 20px 0; text-align: center; }
.capitano-selected {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--rosa-elettrico);
    border-radius: 10px;
    color: white;
    margin: 10px 0;
}
.capitano-selected img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.search-container { margin-bottom: 15px; }
.search-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background: #000000;
    color: white;
}

.player-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff19ff;
    color: black;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Bottone salva */
.bottone-salva {
    background: linear-gradient(135deg, var(--rosa-elettrico), #ff69b4);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
}
.bottone-salva:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Modal azioni giocatore */
#actionModal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.action-modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    margin: 20% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 350px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}
.action-button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.action-button:focus { outline: none; }
.action-button.cambiarlo {
    background: #000000;
    color: white;
    border: 2px solid #333;
}
.action-button.cambiarlo:hover {
    background: #333;
    transform: translateY(-2px);
}
.action-button.capitano {
    background: var(--rosa-elettrico);
    color: white;
}
.action-button.capitano:hover {
    background: #ff33ff;
    transform: translateY(-2px);
}