/* ========================================
   LOGIN SCREEN - Estilo Premium Cinematográfico
   ======================================== */

/* ---- Container Principal ---- */
.login-section.active {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    z-index: var(--z-overlay);
}

/* ---- Background Cinematográfico ---- */
.login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Camada 1: Gradiente base profundo */
.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(120, 0, 0, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(20, 20, 80, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.9) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a0a 0%, #0d0d1a 30%, #0a0a12 60%, #000 100%);
    z-index: 1;
}

/* Camada 2: Efeito de luz volumétrica animada */
.login-bg::after {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(circle at 30% 40%, rgba(229, 9, 20, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(100, 100, 200, 0.04) 0%, transparent 35%);
    animation: ambientDrift 15s ease-in-out infinite alternate;
    z-index: 2;
}

@keyframes ambientDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-3%, 2%) scale(1.05);
    }

    66% {
        transform: translate(2%, -1%) scale(0.98);
    }

    100% {
        transform: translate(-1%, 3%) scale(1.02);
    }
}

/* Padrão sutil de ruído/textura */
.login-section.active::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ---- Card de Login ---- */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 60px 68px 40px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---- Logo ---- */
.login-logo {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInDown 0.6s ease 0.3s both;
}

.login-logo img {
    height: 48px;
    margin: 0 auto var(--spacing-md);
    filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.3));
}

.login-logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    letter-spacing: 3px;
    color: #e50914;
    text-shadow:
        0 0 20px rgba(229, 9, 20, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
}

.login-tagline {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

/* ---- Formulário ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* ---- Input Group ---- */
.input-group {
    position: relative;
    animation: fadeInUp 0.5s ease both;
}

.input-group:nth-child(1) {
    animation-delay: 0.4s;
}

.input-group:nth-child(2) {
    animation-delay: 0.5s;
}

.input-group label {
    display: none;
}

.input-group input {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    background: rgba(51, 51, 51, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    line-height: 50px;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: #777;
}

.input-group input:focus {
    background: rgba(69, 69, 69, 0.9);
    border-color: rgba(229, 9, 20, 0.5);
    box-shadow: 0 0 0 1px rgba(229, 9, 20, 0.2);
    outline: none;
}

.input-group input:focus~.input-icon {
    color: var(--color-primary);
}

/* ---- Botão Login ---- */
.login-btn {
    position: relative;
    width: 100%;
    height: 50px;
    background: #e50914;
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease 0.6s both;
    margin-top: 24px;
    letter-spacing: 0.5px;
    border: none;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: all 0.6s ease;
}

.login-btn:hover {
    background: #f40612;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---- Loading State ---- */
.login-btn .btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: var(--radius-full);
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-spinner {
    display: block;
}

/* ---- Erro ---- */
.login-error {
    display: none;
    padding: var(--spacing-md);
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.25);
    border-radius: 4px;
    color: #ff6b6b;
    font-size: 13px;
    text-align: center;
    animation: shake 0.4s ease;
}

.login-error.visible {
    display: block;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* ---- Footer do Login ---- */
.login-footer {
    margin-top: var(--spacing-xl);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    animation: fadeIn 0.5s ease 0.8s both;
    letter-spacing: 0.5px;
}

/* ---- Responsivo ---- */
@media (max-width: 480px) {
    .login-card {
        margin: var(--spacing-md);
        padding: 40px 28px 32px;
        border-radius: 8px;
    }

    .login-logo-text {
        font-size: 2.5rem;
    }
}