/* Gatekeeper - Modal de Entrada Transparente */
#gatekeeper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    /* Dynamic Viewport Height to handle mobile bars */
    z-index: 9999;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.8) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Always try to center */
    padding: 15px;
    transition: opacity 0.5s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gatekeeper-modal {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid var(--primary, #ff6600);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    color: #fff;
    transform: translateY(0);
    animation: slideUp 0.4s ease-out;
    margin: auto;
    /* Mantém centralizado mas permite scroll do pai */
}

@media (max-width: 480px) {
    #gatekeeper-overlay {
        align-items: center;
        /* Force centering even on mobile */
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .gatekeeper-modal {
        padding: 1.5rem;
    }

    .gatekeeper-modal h3 {
        font-size: 1.5rem;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gatekeeper-modal h3 {
    margin-bottom: 0.5rem;
    color: var(--primary, #ff6600);
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gatekeeper-modal p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #ccc;
    line-height: 1.4;
}

.gk-input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.gk-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #888;
}

.gatekeeper-modal input,
.gatekeeper-modal select {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.gatekeeper-modal input:focus,
.gatekeeper-modal select:focus {
    outline: none;
    border-color: var(--primary, #ff6600);
    background: #2a2a2a;
}

.btn-enter {
    width: 100%;
    padding: 16px;
    background: var(--primary, #ff6600);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    text-transform: uppercase;
    transition: transform 0.2s, background 0.2s;
}

.btn-enter:hover {
    background: #ff7700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

.btn-enter:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

.transparency-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #333;
    padding-top: 1rem;
}

body.modal-open {
    overflow: hidden;
}

/* Erro */
#gk-error {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 68, 68, 0.2);
}