/* Import font Google */
@import url('https://fonts.googleapis.com/css2?family=Fugaz+One&family=Montserrat&display=swap');

/* Palette colori */
:root {
    --primary-blue: #00142f;
    --accent-yellow: #fcd705;
    --white: #ffffff;
    --error-red: #e74c3c;
}

/* Corpo pagina e sfondo */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--white);
    text-align: center;
    position: relative;
    min-height: 100vh;

    /* Sfondo */
    background: url('img/sfondo_home.jpg') no-repeat top center fixed;
    background-size: cover;
}

/* Overlay semitrasparente */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 20, 47, 0.6);
    z-index: -1;
}

/* Layout a 3 colonne */
.content-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin-top: 20rem;
    padding: 0 10px;
}

/* ---------------- LOGIN BOX ---------------- */
.login-box {
    width: 100%;
    max-width: 300px;              
    padding: 8px 12px;         
    background: rgba(0,0,0,0.55);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    position: relative;
}

.login-box h2 {
    margin-bottom: 6px;
    color: var(--accent-yellow);
    font-family: 'Fugaz One', cursive;
    font-size: 16px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.login-box input,
.login-box button {
    display: block;
    width: 100%;
    max-width: 220px;
    padding: 6px;
    margin: 4px auto;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    box-sizing: border-box;
}

.login-box button {
    background: var(--accent-yellow);
    color: var(--primary-blue);
    font-weight: bold;
    cursor: pointer;
    transition: background .2s ease, transform .08s ease;
}

.login-box button:hover {
    background: #ffd933;
    transform: translateY(-1px);
}

/* Link extra */
.extra-links {
    margin-top: 4px;
    font-size: 11px;
}

.extra-links a {
    color: var(--accent-yellow);
    text-decoration: none;
}

.extra-links a:hover {
    text-decoration: underline;
}

/* Error */
.error {
    color: var(--white);
    background: var(--error-red);
    font-weight: bold;
    margin-bottom: 6px;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 12px;
}

/* ---------------- SIDE COLUMNS ---------------- */
.side-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 200px;
}

.side-title {
    width: 100%;
    max-width: 180px;
}

.side-image {
    width: 100%;
    max-width: 180px;
}

/* ---------------- FOOTER ---------------- */
.footer {
    margin-top: 0.5rem;
    padding: 10px 0;
    position: relative;
    z-index: 1;
}

.footer p {
    margin: 0 0 4px 0;
    font-weight: bold;
    color: var(--accent-yellow);
    font-family: 'Fugaz One', cursive;
    font-size: 13px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.social-icons a img {
    width: 22px;
    height: 22px;
}

/* ---------------- REGISTER BOX ---------------- */
.register-box {
    width: 100%;
    max-width: 350px;
    padding: 16px 18px;
    background: rgba(0,0,0,0.55);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    margin: -5rem auto 0 auto;  
    position: relative;
    text-align: center;
    box-sizing: border-box;
}

.register-box h2 {
    margin-bottom: 16px;
    color: var(--accent-yellow);
    font-family: 'Fugaz One', cursive;
    font-size: 20px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.register-box input,
.register-box select,
.register-box button {
    width: 100%;                 /* ?? correzione: piena larghezza */
    padding: 10px 12px;
    margin: 6px 0;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;      /* ?? evita sbordo */
}

.register-box button {
    background: var(--accent-yellow);
    color: var(--primary-blue);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.register-box button:hover {
    background: #ffd933;
}

.strength-text {
    font-size: 13px;
    margin: 5px 0 10px 0;
    font-weight: bold;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-top: 8rem; /* pił basso per mobile */
        padding: 0 15px;
    }

    .login-box, .register-box { 
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }

    .login-box h2, 
    .register-box h2 { 
        font-size: 18px; 
    }

    .login-box input, 
    .login-box button,
    .register-box input,
    .register-box select,
    .register-box button { 
        font-size: 15px; 
        padding: 12px; 
    }

    .side-box {
        display: none; /* ?? tolgo colonne laterali su mobile */
    }

    .footer p { font-size: 12px; }
    .social-icons a img { width: 20px; height: 20px; }
}
