/* ===== Ajustes de Glassmorphism e Neumorphism - Confinamento ===== */
:root {
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --primary-color: #0093C8;
    --secondary-color: #1F336F;
    --accent-color: #B22222;
    --danger-color: #8B0000;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --confinamento-blue: #0093C8;
    --confinamento-dark-blue: #1F336F;
    --confinamento-red: #B22222;
    --confinamento-dark-red: #8B0000;
}

* {
    box-sizing: border-box;
    outline-color: var(--secondary-color);
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 18%; 
    margin: 0;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Aplicação do efeito Glassmorphism nos containers */
.glassmorphism {
    background: var(--glass-bg);
    border-radius: 15px;
    box-shadow: 0 4px 10px var(--shadow-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Botões com efeito Neumorphism - Cores do Confinamento */
.neu-button, .btn-login {
    background: var(--confinamento-blue);
    color: white;
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2),
                -5px -5px 10px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease-in-out;
    text-align: center;
    border: none;
}

.neu-button:hover, .btn-login:hover {
    background: var(--confinamento-red);
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2),
                inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    transform: scale(1.03);
    color: white;
}

/* ===== Melhorias no Vídeo de Fundo ===== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    animation: slow-motion 60s linear infinite;
}

.video-background.loaded video {
    opacity: 1;
}

@keyframes slow-motion {
    0% { transform: translateX(-50%) translateY(-50%) scale(1); }
    50% { transform: translateX(-50%) translateY(-50%) scale(1.05); }
    100% { transform: translateX(-50%) translateY(-50%) scale(1); }
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Fallback para dispositivos que não carregam o vídeo */
.video-background .fallback-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background-image: url('../img/loginnovo.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

@media (max-width: 768px) {
    .video-background video {
        display: none !important;
    }
    .video-background .fallback-img {
        display: block !important;
    }
    body {
        background-color: var(--confinamento-dark-blue);
    }
}

/* Estilos do Login Container */
.login-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 400px;
    max-width: 90%;
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
}

.login-container:focus-within {
    transform: scale(1.02);
}

.login-header {
    background: linear-gradient(135deg, var(--confinamento-blue), var(--confinamento-dark-blue));
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 80px 80px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-header img {
    max-width: 80px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.login-header img:hover {
    transform: scale(1.1);
}

.login-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.login-header p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.login-form {
    padding: 30px;
}

.form-floating {
    margin-bottom: 20px;
}

.form-floating input {
    border-color: var(--light-color);
    transition: border-color 0.3s ease;
    border-radius: 5px;
}

.form-floating input:focus {
    border-color: var(--confinamento-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 147, 200, 0.25);
}

.form-floating label {
    color: var(--confinamento-blue);
}

.error-message {
    color: var(--confinamento-red);
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.version-info {
    font-size: 0.9rem;
    color: #636363;
    margin-top: 15px;
    text-align: center;
}

.version-info img {
    margin-top: 15px;
    padding: 20px;
    width: 95%;
}

.system-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    background: linear-gradient(135deg, var(--confinamento-blue), var(--confinamento-dark-blue));
    border-radius: 8px;
    color: white;
}

.system-stats i {
    font-size: 1.2rem;
    color: #fff;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 480px) {
    body {
        padding-left: 0;
        justify-content: center;
    }
    
    .login-container {
        width: 95%;
        margin: 0 auto;
    }
    
    .login-header {
        padding: 15px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-form {
        padding: 20px;
    }
}