/* Importando a mesma fonte para consistência */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at bottom left, #1a1a2e, #16213e, #0f3460);
    overflow: hidden;
}

.login-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.7s ease-out;
}

h2 {
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00f2ff, transparent);
    margin-bottom: 30px;
}

/* Campos de entrada */
input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00f2ff;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

/* Botão Principal */
button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #00f2ff, #0066ff);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

button:hover {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
    transform: scale(1.02);
}

/* Botão de Registrar (Estilo Outline) */
button.register {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

button.register:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

button.register a {
    color: #fff;
    text-decoration: none;
    display: block;
    width: 100%;
}

/* Mensagens de Feedback */
.success {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #00ff88;
}

.error {
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #ff4b4b;
}

/* Animação */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Query para Celulares */
@media (max-width: 480px) {
    body {
        /* Remove o overflow hidden para permitir rolar se o teclado abrir */
        overflow-y: auto;
        padding: 20px;
        align-items: flex-start; /* Alinha ao topo para o teclado não cobrir tudo */
        padding-top: 10vh;
    }

    .login-container {
        padding: 30px 20px;
        width: 100%;
        max-width: none;
        border-radius: 15px;
    }

    h2 {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

    /* Melhora a usabilidade dos inputs no toque */
    input {
        padding: 14px;
        font-size: 16px; /* Tamanho mínimo para evitar zoom no iPhone */
        margin-bottom: 15px;
    }

    button {
        padding: 14px;
        font-size: 14px;
    }

    /* Garante que o fundo cubra toda a tela mesmo com scroll */
    body::before {
        content: "";
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: -1;
        background: radial-gradient(circle at bottom left, #1a1a2e, #16213e, #0f3460);
    }
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: black;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}