/* ==========================================================================
   RESET & BASE ELÁSTICA (CENTRALIZAÇÃO COMPACTA INTELIGENTE)
   ========================================================================== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-1: #02132b;
    --azul-2: #06285b;
    --ouro: #ffb400;
    --laranja: #ff8c00;
    --texto: #ffffff;
    --glass: rgba(255, 255, 255, 0.04);
    --borda: rgba(255, 255, 255, 0.08);
    --sombra-neon: rgba(255, 180, 0, 0.2);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: 
        radial-gradient(circle at top left, rgba(13, 76, 181, 0.25), transparent 35%),
        radial-gradient(circle at bottom right, rgba(255, 180, 0, 0.08), transparent 35%),
        linear-gradient(135deg, var(--azul-1), var(--azul-2));
    
    /* Permite centralização vertical natural no PC mas libera scroll se crescer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--texto);
    position: relative;
    padding: 40px 20px;
    overflow-x: hidden;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 45px 45px;
    pointer-events: none;
    z-index: 1;
}

.container-login {
    width: 100%;
    max-width: 420px;
    margin: auto; /* Alinhamento dinâmico que centraliza perfeitamente no monitor */
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   CARD DE LOGIN
   ========================================================================== */
.login-card {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--borda);
    border-radius: 24px;
    padding: 35px 30px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

/* CONTAINER DE LOGOS INTERNO */
.branding {
    width: 100% !important;
    text-align: center !important;
    padding-bottom: 20px !important;
    margin: 0 auto 25px auto !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: block !important;
}

.logo-tibm,
.logo-torneio {
    display: inline-block !important;
    vertical-align: middle !important;
    width: auto !important;
}

.logo-tibm {
    height: 80px !important;
    margin-right: 10px !important;
}

.logo-torneio {
    height: 80px !important;
    margin-left: 10px !important;
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 70%, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
}

/* ==========================================================================
   FORMULÁRIO & INPUTS
   ========================================================================== */
.form-login {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Wrapper para organizar o rótulo e o link esqueci minha senha na mesma linha */
.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
}

/* Estilo do Link Esqueci Minha Senha */
.forgot-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--ouro);
}

.input-group input {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0 14px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.25s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.input-group input:focus {
    outline: none;
    border-color: var(--ouro);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 12px var(--sombra-neon);
}

/* ==========================================================================
   BOTÕES DE AÇÃO
   ========================================================================== */
.btn-login {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--ouro), var(--laranja));
    color: #0b111e;
    font-weight: 800;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15);
    margin-top: 5px;
    transition: all 0.25s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 180, 0, 0.3);
}

.btn-google {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.register-link {
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 8px;
}

.register-link a {
    color: var(--ouro);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.register-link a:hover {
    color: var(--laranja);
    text-decoration: underline;
}

/* ALERTA ERRO INTERNAL */
.alerta-erro {
    background: linear-gradient(90deg, rgba(255, 71, 71, 0.12), rgba(255, 71, 71, 0.03));
    border: 1px solid rgba(255, 71, 71, 0.25);
    color: #ff6b6b;
    padding: 10px 14px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

/* FOOTER SEGURO */
footer {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    padding-top: 25px;
    margin-top: auto; /* Empurra o rodapé para longe do card naturalmente */
    width: 100%;
    z-index: 2;
}

/* ==========================================================================
   MEDIA QUERIES MÓVEL
   ========================================================================== */
@media (max-width: 480px) {
    body { padding: 20px 10px; }
    .container-login { padding: 0 4px; }
    .login-card { padding: 25px 20px 20px; border-radius: 18px; }
    .branding { gap: 15px; padding-bottom: 15px; margin-bottom: 20px; }
    .logo-tibm { height: 34px; }
    .logo-torneio { height: 38px; }
    .card-header h2 { font-size: 1.4rem; }
    
    .input-group input, .btn-login, .btn-google {
        height: 44px;
        font-size: 0.85rem;
    }
}
/* ==========================================================================
   ALINHAMENTO DO CONTEÚDO DO BOTÃO GOOGLE NATIVO
   ========================================================================== */
.google-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

/* Força o iframe gerado pelo Google a respeitar a largura do card no celular */
.google-btn-container > div {
    width: 100% !important;
    max-width: 100% !important;
}

@media(max-width: 480px) {
    .google-btn-container {
        margin-top: 2px;
    }
}
