        /* ================= PORTÕES DE ROOKHAVEN: TELA DE LOGIN ÉPICA ================= */
        body.ttcg-gate-locked #meta-ui-root,
        body.ttcg-gate-locked #arena-container,
        body.ttcg-gate-locked>header {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        #rookhaven-gatekeeper {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background-color: #07080a;
            overflow-y: auto;
            overflow-x: hidden;
            transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
        }

        #rookhaven-gatekeeper.gate-unlocking {
            opacity: 0;
            transform: scale(1.06);
            pointer-events: none;
        }

        /* Camada de Imagem de Background com Zoom Lento Cinematográfico */
        .gate-bg-image {
            position: fixed;
            inset: -4%;
            width: 108%;
            height: 108%;
            object-fit: cover;
            object-position: center;
            filter: brightness(0.55) contrast(1.12) saturate(1.1);
            animation: slowPanZoom 28s infinite alternate ease-in-out;
            pointer-events: none;
            z-index: 1;
        }

        @keyframes slowPanZoom {
            0% {
                transform: scale(1) translate(0, 0);
            }

            100% {
                transform: scale(1.06) translate(-1%, -1%);
            }
        }

        /* Vinheta medieval e atmosfera de masmorra */
        .gate-vignette {
            position: fixed;
            inset: 0;
            background:
                radial-gradient(circle at 50% 38%, rgba(245, 158, 11, 0.12) 0%, rgba(15, 17, 23, 0.72) 52%, rgba(5, 6, 8, 0.96) 100%),
                linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.88) 100%);
            pointer-events: none;
            z-index: 2;
        }

        /* Painel Principal de Pedra Chanfrada Estilo Tibia 7.4/7.6 */
        .gate-stone-citadel {
            position: relative;
            z-index: 10;
            background:
                radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.10) 0%, transparent 60%),
                linear-gradient(180deg, #1d2028 0%, #13151b 55%, #0d0f13 100%);
            border: 2px solid #c59f3e;
            box-shadow:
                0 25px 70px rgba(0, 0, 0, 0.95),
                0 0 35px rgba(212, 175, 55, 0.18),
                inset 0 0 0 2px #2b261d,
                inset 0 0 28px rgba(0, 0, 0, 0.9);
        }

        /* Cantoneiras de Ouro e Rebites Medievais */
        .gate-corner {
            position: absolute;
            width: 14px;
            height: 14px;
            border-color: #fde047;
            pointer-events: none;
            z-index: 20;
        }

        .gate-corner-tl {
            top: 5px;
            left: 5px;
            border-top: 2px solid;
            border-left: 2px solid;
        }

        .gate-corner-tr {
            top: 5px;
            right: 5px;
            border-top: 2px solid;
            border-right: 2px solid;
        }

        .gate-corner-bl {
            bottom: 5px;
            left: 5px;
            border-bottom: 2px solid;
            border-left: 2px solid;
        }

        .gate-corner-br {
            bottom: 5px;
            right: 5px;
            border-bottom: 2px solid;
            border-right: 2px solid;
        }

        /* Rebaixo de pedra para os campos de texto */
        .gate-input-well {
            background: linear-gradient(180deg, #090a0d 0%, #12151c 100%);
            border: 1.5px solid #3d362a;
            box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.05);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .gate-input-well:focus-within {
            border-color: #f59e0b;
            box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.95), 0 0 14px rgba(245, 158, 11, 0.35);
        }

        /* Animação de Erro (Shake) quando a senha está incorreta */
        @keyframes gateRejectShake {

            0%,
            100% {
                transform: translateX(0);
            }

            20% {
                transform: translateX(-9px);
            }

            40% {
                transform: translateX(9px);
            }

            60% {
                transform: translateX(-6px);
            }

            80% {
                transform: translateX(6px);
            }
        }

        .gate-shake-error {
            animation: gateRejectShake 0.42s ease-in-out;
        }

        /* Brasas flutuantes (Embers) */
        @keyframes floatEmber {
            0% {
                transform: translateY(100vh) translateX(0) scale(0.6);
                opacity: 0;
            }

            20% {
                opacity: 0.85;
            }

            80% {
                opacity: 0.65;
            }

            100% {
                transform: translateY(-10vh) translateX(40px) scale(1.2);
                opacity: 0;
            }
        }

        .gate-ember {
            position: fixed;
            bottom: -20px;
            width: 4px;
            height: 4px;
            border-radius: 9999px;
            background: radial-gradient(circle, #fde047 0%, #f97316 60%, transparent 100%);
            box-shadow: 0 0 8px #f59e0b;
            pointer-events: none;
            z-index: 3;
            animation: floatEmber linear infinite;
        }