@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at 20% 30%, #0a1628, #000000);
    overflow-x: hidden;
    position: relative;
}

/* Video Background Cinematográfico */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.85), rgba(15, 58, 125, 0.4));
    backdrop-filter: blur(2px);
    z-index: 1;
}

/* Container Premium */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
    background: rgba(10, 20, 40, 0.75);
    backdrop-filter: blur(20px);
    padding: clamp(28px, 6vw, 48px) clamp(24px, 5vw, 40px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.container:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: clamp(28px, 6vw, 40px);
}

.logo-text h1 {
    font-size: clamp(36px, 8vw, 52px);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.logo .minas {
    background: linear-gradient(135deg, #FFFFFF, #c4d2ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo .aerea {
    background: linear-gradient(135deg, #9bb9ff, #3b6ea0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    font-size: clamp(11px, 3vw, 13px);
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    text-transform: uppercase;
}

/* Formulário */
.form-group {
    margin-bottom: clamp(20px, 4vw, 28px);
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
}

label i {
    margin-right: 8px;
    color: #6c9eff;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

input:focus {
    outline: none;
    border-color: #6c9eff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(108, 158, 255, 0.15);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Botão Principal */
.btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(105deg, #ffffff, #e0ecff);
    color: #0F3A7D;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.2);
    background: #ffffff;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

/* Alertas */
.alert {
    padding: 14px 18px;
    border-radius: 20px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(8px);
}

.alert-error {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #ff8a8a;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

/* Links */
.links {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}

.links a:hover {
    color: #6c9eff;
}

/* Código de Verificação */
.code-input {
    text-align: center;
    letter-spacing: 12px;
    font-size: 1.8rem;
    font-weight: 600;
    padding: 16px !important;
}

.input-hint {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    text-align: center;
}

.resend-section {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.resend-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.resend-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resend-info {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 12px;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.back-to-login a:hover {
    color: #6c9eff;
}

.copyright {
    text-align: center;
    margin-top: 32px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Grade de Fotos - Cards de Acesso Rápido */
.grade-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.foto-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.foto-card:hover {
    background: rgba(108, 158, 255, 0.15);
    transform: translateY(-3px);
}

.foto-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(108, 158, 255, 0.5);
    margin-bottom: 8px;
}

.btn-deslogar {
    background: rgba(220, 38, 38, 0.2);
    border: none;
    color: #ff8a8a;
    padding: 6px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-deslogar:hover {
    background: rgba(220, 38, 38, 0.4);
    color: #ffb3b3;
}

.separador-fotos {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 16px 0 24px;
}

.required-field label::after {
    content: "*";
    color: #ef4444;
    margin-left: 4px;
}

/* Bloqueio */
.blocked-message {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 20px;
    text-align: center;
}

/* Responsividade Mobile-First */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .container {
        padding: 24px 20px;
        border-radius: 32px;
    }
    
    .btn {
        padding: 12px 16px;
    }
    
    .grade-fotos {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 8px;
    }
    
    .foto-card img {
        width: 50px;
        height: 50px;
    }
    
    .btn-deslogar {
        font-size: 0.6rem;
        padding: 4px 6px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 480px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeInUp 0.6s ease-out;
}