/* Login page style - Versione scura */

:root {
    --primary-color: #cc0000;
    --primary-color-rgb: 204, 0, 0;
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --card-bg: rgba(35, 35, 35, 0.9);
    --text-light: #ffffff;
    --text-gray: #bbbbbb;
    --border-dark: #333333;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000000;
}

body {
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: var(--text-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(204, 0, 0, 0.3) 50%, 
        rgba(0, 0, 0, 0.7) 100%);
    z-index: 10;
}

body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(204, 0, 0, 0.2) 50%, 
        rgba(0, 0, 0, 0.7) 100%);
    z-index: 10;
}

/* Particles container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Login Container - definizione principale in fondo al file */

/* Google Fonts import for futuristic font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* Logo styling */
.logo-container {
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: logoEntrance 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    padding: 0;
    width: 100%;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.96);
    }
    40% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.main-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: logoEntrance 1.2s ease-out, logoPulse 4s infinite alternate;
    filter: drop-shadow(0 0 20px rgba(204, 0, 0, 0.7));
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoPulse {
    0% {
        filter: drop-shadow(0 0 15px rgba(204, 0, 0, 0.6));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(204, 0, 0, 0.8));
    }
    100% {
        filter: drop-shadow(0 0 30px rgba(204, 0, 0, 0.9));
        transform: scale(1.05);
    }
}

.main-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 35px rgba(204, 0, 0, 1));
}

.logo-text-container {
    position: relative;
    padding-bottom: 10px;
    animation: textEntrance 1.5s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@keyframes textEntrance {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-text {
    color: #ffffff;
    font-size: 28px;
    margin: 0 0 6px 0;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 12px rgba(204, 0, 0, 0.8);
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    white-space: nowrap;
    animation: textPulse 4s infinite alternate;
}

@keyframes textPulse {
    0% {
        text-shadow: 0 0 10px rgba(204, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.8);
    }
    50% {
        text-shadow: 0 0 15px rgba(204, 0, 0, 0.8), 0 0 25px rgba(0, 0, 0, 0.8);
    }
    100% {
        text-shadow: 0 0 20px rgba(204, 0, 0, 1), 0 0 30px rgba(0, 0, 0, 0.9);
    }
}

.intranet-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    animation: accessTextGlow 3s infinite alternate;
    margin: 0 0 8px 0;
    font-family: 'Rajdhani', sans-serif;
    text-align: center;
    text-transform: uppercase;
}

@keyframes accessTextGlow {
    0% {
        text-shadow: 0 0 5px rgba(204, 0, 0, 0.4), 0 0 2px rgba(255, 255, 255, 0.3);
    }
    100% {
        text-shadow: 0 0 10px rgba(204, 0, 0, 0.7), 0 0 5px rgba(255, 255, 255, 0.5);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 8px rgba(204, 0, 0, 0.5);
    }
    100% {
        text-shadow: 0 0 15px rgba(204, 0, 0, 0.9), 0 0 5px rgba(255, 255, 255, 0.5);
    }
}

.logo-underline {
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(204, 0, 0, 0) 0%, 
        rgba(204, 0, 0, 0.8) 20%, 
        rgba(204, 0, 0, 1) 50%, 
        rgba(204, 0, 0, 0.8) 80%, 
        rgba(204, 0, 0, 0) 100%);
    width: 180px;
    max-width: 90%;
    margin: 0 auto;
    animation: underlineExpand 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), underlinePulse 4s infinite alternate;
    animation-delay: 0.7s, 2s;
    animation-fill-mode: backwards, none;
    position: relative;
    border-radius: 1.5px;
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.5);
}

@keyframes underlinePulse {
    0% {
        box-shadow: 0 0 7px rgba(204, 0, 0, 0.5);
        background: linear-gradient(90deg, 
            rgba(204, 0, 0, 0) 0%, 
            rgba(204, 0, 0, 0.7) 20%, 
            rgba(204, 0, 0, 0.9) 50%, 
            rgba(204, 0, 0, 0.7) 80%, 
            rgba(204, 0, 0, 0) 100%);
    }
    100% {
        box-shadow: 0 0 15px rgba(204, 0, 0, 0.8);
        background: linear-gradient(90deg, 
            rgba(204, 0, 0, 0) 0%, 
            rgba(204, 0, 0, 0.9) 20%, 
            rgba(204, 0, 0, 1) 50%, 
            rgba(204, 0, 0, 0.9) 80%, 
            rgba(204, 0, 0, 0) 100%);
    }
}

.logo-underline:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: underlineGlow 2s infinite;
    animation-delay: 2.5s;
    border-radius: 1.5px;
}

@keyframes underlineExpand {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 180px;
        max-width: 90%;
        opacity: 1;
    }
}

@keyframes underlineGlow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.login-card {
    background-color: rgba(15, 15, 15, 0.5);
    border-radius: 10px;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(204, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: cardFadeIn 0.6s ease-out;
    position: relative;
}

.login-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(204, 0, 0, 0) 0%, 
        rgba(204, 0, 0, 0.6) 20%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(204, 0, 0, 0.6) 80%, 
        rgba(204, 0, 0, 0) 100%);
}

@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    display: none; /* Nascosto come nella prima immagine */
}

.login-form {
    padding: 15px 15px 10px;
}

.form-group {
    margin-bottom: 12px;
    position: relative;
}

.input-icon-wrapper {
    position: relative;
    z-index: 1;
}

.input-icon-wrapper:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(204, 0, 0, 0) 0%, 
        rgba(204, 0, 0, 0.5) 20%, 
        rgba(204, 0, 0, 0.8) 50%, 
        rgba(204, 0, 0, 0.5) 80%, 
        rgba(204, 0, 0, 0) 100%);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    z-index: 2;
}

.input-icon-wrapper:focus-within:before {
    transform: scaleX(1);
}

.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 18px;
    z-index: 2;
    text-shadow: 0 0 5px rgba(204, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.input-icon-wrapper:focus-within i {
    color: #ff3333;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.7);
}

.form-control {
    width: 100%;
    padding: 10px 12px 10px 45px;
    background-color: rgba(30, 30, 35, 0.6);
    border: 1px solid #333;
    border-radius: 6px;
    color: var(--text-light);
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    height: 40px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color), 
                0 0 8px rgba(204, 0, 0, 0.4), 
                inset 0 1px 3px rgba(0, 0, 0, 0.2);
    background-color: rgba(35, 35, 40, 0.7);
}

.form-control::placeholder {
    color: rgba(170, 170, 170, 0.6);
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.form-control:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-check-input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

.btn {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-login {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(204, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-image: linear-gradient(to right, #cc0000, #aa0000);
    z-index: 1;
    height: 40px;
}

.btn-login:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-login:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.btn-login:hover:before {
    left: 100%;
}

.btn-login:hover:after {
    opacity: 1;
}

.btn-login:hover, .btn-login:focus {
    background-image: linear-gradient(to right, #dd0000, #cc0000);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 30px rgba(204, 0, 0, 0.5);
    letter-spacing: 3px;
}

.error-message {
    color: #ff3333;
    font-size: 14px;
    margin-top: 8px;
    font-family: 'Rajdhani', sans-serif;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
    animation: errorPulse 2s infinite;
}

@keyframes errorPulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.login-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid rgba(80, 80, 90, 0.3);
    font-size: 12px;
    color: rgba(200, 200, 210, 0.5);
    font-family: 'Rajdhani', sans-serif;
    position: relative;
}

.login-footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(204, 0, 0, 0) 0%, 
        rgba(204, 0, 0, 0.2) 20%, 
        rgba(204, 0, 0, 0.3) 50%, 
        rgba(204, 0, 0, 0.2) 80%, 
        rgba(204, 0, 0, 0) 100%);
}

.login-footer p {
    margin: 2px 0;
    letter-spacing: 0.5px;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    background-color: rgba(var(--primary-color-rgb), 0.2);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    color: var(--text-light);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Centratura del container */
.login-container {
    position: absolute;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Responsive */
@media (max-width: 400px) {
    .login-container {
        width: 95%;
        max-width: 360px;
    }
    
    .login-form {
        padding: 15px 12px;
    }
    
    .main-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .intranet-text {
        font-size: 14px;
    }
}