* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('../immagini/sfondo.jpg') no-repeat center center fixed;
    background-size: cover;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    z-index: 0;
}

.login-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.input-group {
    position: relative;
    margin-bottom: 35px;
}

.input-group i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    transition: 0.3s;
}

.input-group input {
    width: 100%;
    padding: 12px 5px 12px 30px;
    font-size: 15px;
    color: #ffffff;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
    outline: none;
    transition: 0.3s;
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 35px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transition: 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -5px;
    left: 0;
    transform: translateY(0);
    font-size: 12px;
    color: #38bdf8;
}

.input-group input:focus,
.input-group input:valid {
    border-bottom: 1.5px solid #38bdf8;
}

.input-group input:focus ~ i,
.input-group input:valid ~ i {
    color: #38bdf8;
}

.captcha-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0 25px 0;
    width: 100%;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #0ea5e9;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 12px;
    transition: 0.3s ease;
}

.login-btn:hover {
    background: #0284c7;
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
    transform: translateY(-3px);
}

.link-wrapper {
    position: relative;
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    color: #ffffff;
    font-size: 14px;
}

.link-wrapper::before {
    content: '';
    position: absolute;
    width: 250%;
    height: 250%;
    background: conic-gradient(transparent, #38bdf8, transparent 40%);
    animation: rotate 4s linear infinite;
    z-index: -1;
}

.link-wrapper::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #1e293b;
    border-radius: 6px;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.link-wrapper a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
    transition: 0.3s;
}

.link-wrapper a:hover {
    text-decoration: underline;
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

@media (max-width: 480px) {
    .g-recaptcha { transform: scale(0.85); }
}