/* Nemesis Center — Auth (index / cadastrar)
   Vermelho · dourado · preto + wallpaper + scroll estável */

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Rajdhani:wght@600;700&display=swap");

:root {
    --na-red: #c4182d;
    --na-red-bright: #e8253a;
    --na-gold: #d4af37;
    --na-gold-bright: #f0d060;
    --na-gold-dim: rgba(212, 175, 55, 0.2);
}

/* ——— Scroll: trava a página, rola só o miolo se precisar ——— */
html:has(body.nc-auth-body) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body.nc-auth-body {
    height: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow: hidden !important;
    overscroll-behavior: none;
    background: #050505 !important;
    touch-action: pan-y;
    font-family: "Rajdhani", system-ui, sans-serif;
}

body.nc-auth-body .nc-auth-shell {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    align-items: center;
    justify-content: center;
}

body.nc-auth-body .nc-auth-footer,
body.nc-auth-body .nc-footer.nc-auth-footer {
    flex-shrink: 0;
    padding-top: 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

/* ——— Wallpaper ——— */
body.nc-auth-body .nc-cyber-bg,
body.nc-auth-body .nc-cyber-bg--auth {
    z-index: -3;
    background-color: #000;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

body.nc-auth-body .nc-cyber-bg::after,
body.nc-auth-body .nc-cyber-bg--auth::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, transparent 0%, rgba(0, 0, 0, 0.55) 65%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(40, 0, 8, 0.3) 45%, rgba(0, 0, 0, 0.85) 100%);
}

body.nc-auth-body .nc-cyber-grid {
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(196, 24, 45, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.06) 1px, transparent 1px);
}

body.nc-auth-body .nc-cyber-glow-a { background: rgba(196, 24, 45, 0.25); }
body.nc-auth-body .nc-cyber-glow-b { background: rgba(212, 175, 55, 0.18); }

/* ——— Card ——— */
body.nc-auth-body .nc-cyber-terminal {
    max-width: min(420px, 100%);
    background: rgba(5, 3, 3, 0.9);
    border-color: rgba(212, 175, 55, 0.35);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.85),
        0 0 56px rgba(196, 24, 45, 0.14),
        0 28px 72px rgba(0, 0, 0, 0.72),
        inset 0 1px 0 rgba(240, 208, 96, 0.1);
    animation: na-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes na-in {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

body.nc-auth-body .nc-cyber-terminal::before,
body.nc-auth-body .nc-cyber-terminal::after {
    border-color: var(--na-gold);
    opacity: 0.8;
}

body.nc-auth-body .nc-cyber-titlebar {
    border-bottom-color: rgba(212, 175, 55, 0.2);
    background: linear-gradient(90deg, rgba(196, 24, 45, 0.22), rgba(212, 175, 55, 0.08), transparent);
    color: var(--na-gold-bright);
}

body.nc-auth-body .nc-cyber-titlebar-dots span:first-child {
    background: rgba(196, 24, 45, 0.85);
    box-shadow: 0 0 8px rgba(232, 37, 58, 0.55);
}

body.nc-auth-body .nc-cyber-titlebar-path { color: rgba(240, 208, 96, 0.9); }
body.nc-auth-body .nc-cyber-titlebar-status { color: var(--na-red-bright); }

body.nc-auth-body .nc-cyber-body {
    padding: 22px 22px 20px;
}

/* ——— Logo nova: redonda + efeito pra sobressair ——— */
body.nc-auth-body .nc-auth-logo-wrap {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 4px 0 20px;
    position: relative;
    isolation: isolate;
}

/* halo vermelho atrás */
body.nc-auth-body .nc-auth-logo-wrap::before {
    content: "";
    position: absolute;
    width: min(220px, 58vw);
    height: min(220px, 58vw);
    border-radius: 50%;
    border: none;
    background: radial-gradient(
        circle,
        rgba(232, 37, 58, 0.45) 0%,
        rgba(196, 24, 45, 0.22) 38%,
        rgba(196, 24, 45, 0.06) 62%,
        transparent 72%
    );
    box-shadow:
        0 0 36px rgba(196, 24, 45, 0.55),
        0 0 72px rgba(196, 24, 45, 0.28);
    animation: na-logo-pulse 2.8s ease-in-out infinite;
    z-index: 0;
}

/* anel dourado fino na borda */
body.nc-auth-body .nc-auth-logo-wrap::after {
    content: "";
    position: absolute;
    width: min(198px, 52vw);
    height: min(198px, 52vw);
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.55);
    box-shadow:
        0 0 0 4px rgba(196, 24, 45, 0.2),
        inset 0 0 18px rgba(196, 24, 45, 0.25);
    pointer-events: none;
    z-index: 2;
}

@keyframes na-logo-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

body.nc-auth-body .nc-auth-logo {
    width: min(190px, 50vw);
    height: min(190px, 50vw);
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(232, 37, 58, 0.55);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.65),
        0 0 24px rgba(196, 24, 45, 0.55),
        0 0 48px rgba(196, 24, 45, 0.3);
    filter: none;
    transform: translateZ(0);
}

body.nc-auth-body .nc-field label {
    font-family: "Rajdhani", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--na-gold);
}

body.nc-auth-body .nc-input {
    border-radius: 999px;
    border-color: rgba(212, 175, 55, 0.28);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: inset 0 0 18px rgba(196, 24, 45, 0.05);
}

body.nc-auth-body .nc-input:focus {
    border-color: var(--na-gold);
    box-shadow: 0 0 0 3px var(--na-gold-dim), 0 0 18px rgba(196, 24, 45, 0.15);
}

body.nc-auth-body .nc-input-wrap-left .nc-icon-left {
    color: var(--na-gold);
    opacity: 0.8;
}

/* ——— Botão Entrar: forma nova (losango / corte diagonal) ——— */
body.nc-auth-body .na-btn-enter {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border: none;
    cursor: pointer;
    font-family: "Rajdhani", sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #140800;
    background: linear-gradient(135deg, #f5d76e 0%, #d4af37 40%, #a67c1a 100%);
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    box-shadow: 0 10px 28px rgba(212, 175, 55, 0.35), 0 0 0 1px rgba(196, 24, 45, 0.25);
    transition: filter 0.15s, transform 0.12s, box-shadow 0.15s;
}

body.nc-auth-body .na-btn-enter::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: translateX(-120%) skewX(-18deg);
    animation: na-shine 3.8s ease-in-out infinite;
}

@keyframes na-shine {
    0%, 65%, 100% { transform: translateX(-120%) skewX(-18deg); }
    80% { transform: translateX(160%) skewX(-18deg); }
}

body.nc-auth-body .na-btn-enter:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 36px rgba(212, 175, 55, 0.5), 0 0 24px rgba(196, 24, 45, 0.3);
}

body.nc-auth-body .na-btn-enter:active {
    transform: scale(0.985);
}

body.nc-auth-body .na-btn-enter span {
    position: relative;
    z-index: 1;
}

/* ——— Botão Criar credencial (secundário) ——— */
body.nc-auth-body .na-btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    margin-top: 12px;
    border-radius: 999px;
    border: 1.5px solid rgba(212, 175, 55, 0.45);
    background: rgba(196, 24, 45, 0.12);
    color: var(--na-gold-bright);
    font-family: "Rajdhani", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: inset 0 0 20px rgba(196, 24, 45, 0.08);
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}

body.nc-auth-body .na-btn-ghost:hover {
    background: rgba(196, 24, 45, 0.28);
    border-color: var(--na-red-bright);
    color: #fff;
    box-shadow: 0 0 24px rgba(196, 24, 45, 0.35);
    transform: translateY(-1px);
}

body.nc-auth-body .nc-auth-secondary { display: none !important; }

body.nc-auth-body .nc-turnstile-wrap {
    margin-top: 12px;
    border-color: rgba(212, 175, 55, 0.22);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

body.nc-auth-body .nc-turnstile-target,
body.nc-auth-body #nc-turnstile-target {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

body.nc-auth-body .nc-turnstile-wrap iframe,
body.nc-auth-body .nc-turnstile-target > div {
    margin-left: auto !important;
    margin-right: auto !important;
}

body.nc-auth-body .nc-turnstile-loading {
    justify-content: center;
    width: 100%;
}

body.nc-auth-body .nc-alert-error {
    background: rgba(80, 0, 10, 0.65);
    border-color: rgba(232, 37, 58, 0.5);
    border-radius: 12px;
}

@media (max-height: 700px) {
    body.nc-auth-body .nc-auth-shell {
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    body.nc-auth-body .nc-auth-logo {
        width: min(150px, 42vw);
        height: min(150px, 42vw);
        max-width: 160px;
        max-height: 160px;
    }
    body.nc-auth-body .nc-auth-logo-wrap { margin-bottom: 12px; }
    body.nc-auth-body .nc-auth-logo-wrap::before {
        width: min(178px, 50vw);
        height: min(178px, 50vw);
    }
    body.nc-auth-body .nc-auth-logo-wrap::after {
        width: min(156px, 44vw);
        height: min(156px, 44vw);
    }
    body.nc-auth-body .nc-cyber-body { padding: 14px 16px 12px; }
}

@media (max-width: 640px) {
    body.nc-auth-body .nc-cyber-terminal { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    body.nc-auth-body .nc-cyber-terminal,
    body.nc-auth-body .na-brand-crest,
    body.nc-auth-body .na-btn-enter::before {
        animation: none;
    }
}
