/* Animações da Tela de Login - MotoChefe Brasil */

/* Layout dividido com imagem de fundo */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: modal-appear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Lado esquerdo - Imagem da scooter */
.login-image {
    flex: 1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 40px;
}

/* Overlay com gradiente para melhor legibilidade */
.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 182, 0, 0.1) 0%, 
        rgba(255, 199, 0, 0.05) 50%, 
        rgba(255, 182, 0, 0.1) 100%);
    z-index: 1;
}

/* Conteúdo da imagem */
.image-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.image-content h2 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #FFB600, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



/* Logo da MotoChefe na imagem */
.image-logo {
    width: 200px;
    height: 200px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    animation: logo-float 3s ease-in-out infinite;
}

.image-logo img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* Lado direito - Formulário de login */
.login-form {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        max-width: 95%;
        margin: 20px;
    }
    
    .login-image {
        height: 200px;
        padding: 30px 20px;
    }
    
    .login-form {
        padding: 40px 30px;
    }
    
    .image-content h2 {
        font-size: 28px;
    }
    
    .image-content p {
        font-size: 16px;
    }
}

/* Fundo animado com motos 3D */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.moto-3d {
    position: absolute;
    opacity: 0.1;
    filter: blur(1px);
    animation: float 8s ease-in-out infinite;
}

.moto-3d:nth-child(1) {
    top: 10%;
    left: -15%;
    width: 300px;
    height: 200px;
    background: linear-gradient(45deg, #FFB600, #FFC700);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-15deg);
    animation-delay: 0s;
}

.moto-3d:nth-child(2) {
    top: 60%;
    right: -10%;
    width: 250px;
    height: 180px;
    background: linear-gradient(45deg, #FF6B35, #FF8E53);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(20deg);
    animation-delay: 2s;
}

.moto-3d:nth-child(3) {
    bottom: 20%;
    left: 20%;
    width: 200px;
    height: 150px;
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(45deg);
    animation-delay: 4s;
}

.moto-3d:nth-child(4) {
    top: 30%;
    left: 50%;
    width: 180px;
    height: 120px;
    background: linear-gradient(45deg, #FFE66D, #FFA726);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-30deg);
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(var(--rotation));
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(var(--rotation));
        opacity: 0.2;
    }
}

/* Partículas flutuantes */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFB600;
    border-radius: 50%;
    animation: particle-float 6s linear infinite;
}

.particle:nth-child(5) { top: 20%; left: 30%; animation-delay: 0s; }
.particle:nth-child(6) { top: 70%; left: 80%; animation-delay: 1s; }
.particle:nth-child(7) { top: 40%; left: 70%; animation-delay: 2s; }
.particle:nth-child(8) { top: 80%; left: 20%; animation-delay: 3s; }
.particle:nth-child(9) { top: 10%; left: 90%; animation-delay: 4s; }
.particle:nth-child(10) { top: 60%; left: 10%; animation-delay: 5s; }

@keyframes particle-float {
    0% {
        transform: translateY(0px) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Linhas de energia */
.energy-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFB600, transparent);
    animation: energy-flow 4s linear infinite;
}

.energy-line:nth-child(11) {
    top: 25%;
    left: 0;
    width: 100%;
    animation-delay: 0s;
}

.energy-line:nth-child(12) {
    top: 75%;
    left: 0;
    width: 100%;
    animation-delay: 2s;
}

@keyframes energy-flow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Container principal com animações */
.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    width: 420px;
    border-radius: 25px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 10;
    animation: modal-appear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modal-appear {
    0% {
        transform: scale(0.3) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Efeito de brilho no container */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Área do logo com animações */
.logo-area {
    background: linear-gradient(135deg, #FFB600 0%, #FFC700 50%, #FFD700 100%);
    padding: 50px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.logo-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.logo-area img {
    max-width: 180px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: logo-bounce 2s ease-in-out infinite;
}

@keyframes logo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-area h1 {
    color: #000;
    font-size: 28px;
    font-weight: 900;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: text-glow 2s ease-in-out infinite alternate;
}

@keyframes text-glow {
    0% { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    100% { text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5); }
}

/* Título do formulário com animação */
.form-title {
    color: #333;
    font-size: 20px;
    margin-bottom: 35px;
    text-align: center;
    font-weight: 500;
    position: relative;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FFB600, #FFC700);
    border-radius: 2px;
    animation: title-underline 2s ease-in-out infinite;
}

@keyframes title-underline {
    0%, 100% { width: 60px; }
    50% { width: 100px; }
}

/* Grupos do formulário com animação de entrada */
.form-group {
    margin-bottom: 25px;
    position: relative;
    animation: form-slide-up 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes form-slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Campos de entrada com animações */
.form-control {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: #FFB600;
    box-shadow: 
        0 0 0 4px rgba(255, 182, 0, 0.1),
        0 8px 25px rgba(255, 182, 0, 0.2);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #FFC700;
    transform: translateY(-1px);
}

/* Botão de login com animações */
.btn-login {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #FFB600 0%, #FFC700 100%);
    border: none;
    border-radius: 15px;
    color: #000;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #FFC700 0%, #FFD700 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(255, 182, 0, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-login:active {
    transform: translateY(-1px);
}

/* Alertas com animação */
.alert {
    padding: 18px;
    margin-bottom: 25px;
    border-radius: 12px;
    color: #721c24;
    background: rgba(248, 215, 218, 0.9);
    border: 1px solid rgba(245, 198, 203, 0.8);
    backdrop-filter: blur(10px);
    animation: alert-slide-in 0.5s ease-out;
}

@keyframes alert-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Link "Esqueci minha senha" com animações */
.forgot-password {
    text-align: center;
    margin-top: 25px;
    animation: fade-in 0.8s ease-out 0.4s both;
}

.forgot-password a {
    color: #FFB600;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFB600;
    transition: width 0.3s ease;
}

.forgot-password a:hover::after {
    width: 100%;
}

.forgot-password a:hover {
    color: #FFC700;
    text-shadow: 0 0 10px rgba(255, 182, 0, 0.3);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Partículas que saem do modal */
.modal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.modal-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #FFB600;
    border-radius: 50%;
    animation: modal-particle-float 3s ease-out infinite;
}

.modal-particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.modal-particle:nth-child(2) { top: 30%; right: 15%; animation-delay: 0.5s; }
.modal-particle:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 1s; }
.modal-particle:nth-child(4) { bottom: 20%; right: 25%; animation-delay: 1.5s; }

@keyframes modal-particle-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* Efeito ripple para o botão */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        width: 95%;
        margin: 10px;
    }
    
    .form-container {
        padding: 40px 25px;
    }
    
    .logo-area {
        padding: 40px 20px;
    }
    
    .logo-area h1 {
        font-size: 24px;
    }
    
    .form-title {
        font-size: 18px;
    }

    .moto-3d {
        display: none;
    }
}

/* Animações de entrada para elementos específicos */
.form-container {
    padding: 50px 40px;
    position: relative;
}

/* Efeitos de hover adicionais */
.form-group:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Animações de carregamento */
.loading {
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

/* Efeitos de transição suaves */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Melhorias de performance */
.moto-3d, .particle, .energy-line {
    will-change: transform, opacity;
}

/* Efeitos de profundidade */
.container {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Animações de entrada escalonadas */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.btn-login { animation-delay: 0.4s; }
.forgot-password { animation-delay: 0.5s; }
