/* ==========================================================================
   RESET & BASE CENTRALIZADA ABSOLUTA
   ========================================================================== */
*{
    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));
    
    height: 100vh;
    max-height: 100vh;
    overflow: hidden; /* Mata barras de rolagem indesejadas no computador */
    color: var(--texto);
    position: relative;
    padding: 0;
}

.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-cadastro {
    width: 100%;
    max-width: 440px; /* Levemente mais largo para acomodar os campos confortavelmente */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centralização matemática perfeita no monitor */
    z-index: 2;
    padding: 0 10px;
}

/* ==========================================================================
   CARD DE CADASTRO PREMIUM GLASSMORPHISM
   ========================================================================== */
.cadastro-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;
}

/* FORÇA A CENTRALIZAÇÃO INABALÁVEL DAS LOGOS NO TOPO INTERNO */
.branding {
    width: 100% !important;
    text-align: center !important;
    padding-bottom: 20px !important;
    margin: 0 auto 20px 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: 100px !important;
    margin-right: 10px !important;
}

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

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

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    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.85rem;
}

/* ==========================================================================
   FORMULÁRIO & INPUTS SLIM
   ========================================================================== */
.form-cadastro {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Espaçamento mais compacto para caber os 4 campos sem apertar */
}

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

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

.input-group input {
    width: 100%;
    height: 42px; /* Layout Slim idêntico ao dashboard para economizar tela */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0 14px;
    color: #fff;
    font-size: 0.88rem;
    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ÃO CRIAR CONTA & LINKS
   ========================================================================== */
.btn-cadastro {
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--ouro), var(--laranja));
    color: #0b111e;
    font-weight: 800;
    font-size: 0.88rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15);
    margin-top: 10px;
    transition: all 0.25s ease;
}

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

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

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

.login-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: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
}

/* FOOTER NA BASE */
footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    z-index: 2;
    padding: 0 10px;
}

/* ==========================================================================
   MEDIA QUERIES MÓVEL (DESTRATIFICAÇÃO ABSOLUTA)
   ========================================================================== */
@media (max-width: 480px) {
    body {
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
    }

    .container-cadastro {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 20px auto !important;
        padding: 0 6px;
    }

    .cadastro-card {
        padding: 25px 18px 20px;
        border-radius: 18px;
    }

    .logos { gap: 15px; padding-bottom: 15px; }
    .logo-tibm { height: 34px; }
    .logo-torneio { height: 38px; }
    .card-header h2 { font-size: 1.35rem; }
    
    .input-group input, .btn-cadastro {
        height: 42px;
        font-size: 0.85rem;
    }

    footer {
        position: relative !important;
        bottom: auto !important;
        margin-top: 20px !important;
    }
}
